Changeset 3726
- Timestamp:
- 09/19/09 15:02:26 (2 years ago)
- Location:
- trunk/htdocs/system
- Files:
-
- 4 edited
-
classes/adminhandler.php (modified) (3 diffs)
-
classes/installhandler.php (modified) (1 diff)
-
classes/version.php (modified) (1 diff)
-
plugins/coredashmodules/coredashmodules.plugin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/htdocs/system/classes/adminhandler.php
r3725 r3726 433 433 $modules = Modules::get_active(); 434 434 435 // append the 'Add Item' module 436 $modules['nosort'] = 'Add Item'; 437 438 // register the 'Add Item' filter 439 Plugins::register( array( $this, 'filter_dash_module_add_item' ), 'filter', 'dash_module_add_item'); 435 if(User::identify()->can('manage_dash_modules')) { 436 // append the 'Add Item' module 437 $modules['nosort'] = 'Add Item'; 438 439 // register the 'Add Item' filter 440 Plugins::register( array( $this, 'filter_dash_module_add_item' ), 'filter', 'dash_module_add_item'); 441 } 440 442 441 443 foreach ( $modules as $id => $module_name ) { … … 620 622 621 623 $edit_user = User::identify(); 624 $permission = false; 622 625 623 626 if ( ($this->handler_vars['user'] == '') || (User::get_by_name($this->handler_vars['user']) == $edit_user) ) { 627 if($edit_user->can('manage_self') || $edit_user->can('manage_users')) { 628 $permission = true; 629 } 624 630 $who = _t("You"); 625 631 $possessive = _t("Your User Information"); 626 632 } 627 633 else { 634 if($edit_user->can('manage_users')) { 635 $permission = true; 636 } 628 637 $edit_user = User::get_by_name($this->handler_vars['user']); 629 638 $who = $edit_user->username; 630 639 $possessive = sprintf( _t("%s's User Information"), $who ); 640 } 641 642 if(!$permission) { 643 Session::error(_t('Access to that page has been denied by the administrator.')); 644 $this->get_blank(); 645 return; 631 646 } 632 647 … … 3086 3101 'import' => array( 'url' => URL::get( 'admin', 'page=import' ), 'title' => _t( 'Import content from another blog' ), 'text' => _t( 'Import' ), 'hotkey' => 'I', 'access'=>array('manage_import'=>true) ), 3087 3102 'users' => array( 'url' => URL::get( 'admin', 'page=users' ), 'title' => _t( 'View and manage users' ), 'text' => _t( 'Users' ), 'hotkey' => 'U', 'access'=>array('manage_users'=>true) ), 3103 'profile' => array( 'url' => URL::get( 'admin', 'page=user' ), 'title' => _t( 'Manage your user profile' ), 'text' => _t( 'My Profile' ), 'hotkey' => 'M', 'access'=>array('manage_self'=>true, 'manage_users'=>true) ), 3088 3104 'groups' => array( 'url' => URL::get( 'admin', 'page=groups' ), 'title' => _t( 'View and manage groups' ), 'text' => _t( 'Groups' ), 'hotkey' => 'G', 'access'=>array('manage_groups'=>true) ), 3089 3105 'logs' => array( 'url' => URL::get( 'admin', 'page=logs'), 'title' => _t( 'View system log messages' ), 'text' => _t( 'Logs' ), 'hotkey' => 'L', 'access'=>array('manage_logs'=>true) ) , -
trunk/htdocs/system/classes/installhandler.php
r3706 r3726 1449 1449 ACL::create_token( 'manage_self', _t('Edit own profile'), 'Administration' ); 1450 1450 } 1451 1452 private function upgrade_db_post_3701() 1453 { 1454 ACL::create_token( 'manage_dash_modules', _t('Manage dashboard modules'), 'Administration' ); 1455 } 1451 1456 1452 1457 /** -
trunk/htdocs/system/classes/version.php
r3699 r3726 15 15 // DB and API versions are aligned with the SVN revision 16 16 // number in which they last changed. 17 const DB_VERSION = 3 699;17 const DB_VERSION = 3702; 18 18 const API_VERSION = 3124; 19 19 -
trunk/htdocs/system/plugins/coredashmodules/coredashmodules.plugin.php
r3624 r3726 44 44 function filter_dash_modules( $modules ) 45 45 { 46 array_push( $modules, 'Latest Entries', 'Latest Comments', 'Latest Log Activity' ); 46 $modules[] = 'Latest Entries'; 47 if(User::identify()->can('manage_all_comments')) { 48 $modules[] = 'Latest Comments'; 49 } 50 if(User::identify()->can('manage_logs')) { 51 $modules[] = 'Latest Log Activity'; 52 } 47 53 48 54 $this->add_template( 'dash_logs', dirname( __FILE__ ) . '/dash_logs.php' );
Note: See TracChangeset
for help on using the changeset viewer.
