Changeset 2522

Show
Ignore:
Timestamp:
06/06/08 08:28:47 (20 months ago)
Author:
fumiakiy
Message:

Blog administrators should be able to search for users to grant access to their blogs. BugId:80000

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-39/lib/MT/CMS/Search.pm

    r2352 r2522  
    406406        ## if $blog_id is specified. it affects the setup_terms_args. 
    407407        if ( $app->param('__mode') eq 'dialog_grant_role' ) { 
     408            if ($blog_id) { 
     409                my $perm = $author->permissions($blog_id); 
     410                return $app->errtrans('Permission denied.') 
     411                    unless $perm->can_administer_blog; 
     412            } 
    408413            $blog_id = 0; 
    409414        } 
     
    446451            }; 
    447452        } else { 
    448             if ( $blog_id || ($type eq 'blog') ) { 
     453            if ( $blog_id 
     454              || ( $type eq 'blog' ) 
     455              || ( $app->mode eq 'dialog_grant_role' ) ) 
     456            { 
    449457                $iter = $class->load_iter( \%terms, \%args ) or die $class->errstr; 
    450458            }