Changeset 3698


Ignore:
Timestamp:
08/14/09 06:47:12 (2 years ago)
Author:
michaeltwofish
Message:

Allow users to edit their own profile page. Closes #1012. Thanks heptat for the patch.

Location:
trunk/htdocs/system
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/admin/footer.php

    r3678 r3698  
    1010         <span class="middot">&middot;</span> 
    1111         <span><?php _e('Logged in as'); ?></span> 
    12          <?php if( User::identify()->can( 'manage_users' ) ) { ?> 
     12         <?php if( User::identify()->can( 'manage_users' ) || User::identify()->can( 'manage_self' ) ) { ?> 
    1313                         <a href="<?php Site::out_url( 'admin' ); ?>/user" title="<?php _e('Go to your user page'); ?>"><?php echo User::identify()->displayname ?></a> 
    1414        <?php } else { ?> 
  • trunk/htdocs/system/classes/acl.php

    r3660 r3698  
    788788                self::create_token( 'manage_import', _t('Use the importer'), 'Administration' ); 
    789789                self::create_token( 'manage_users', _t('Add, remove, and edit users'), 'Administration' ); 
     790                self::create_token( 'manage_self', _t('Edit own profile'), 'Administration' ); 
    790791                self::create_token( 'manage_groups', _t('Manage groups and permissions'), 'Administration' ); 
    791792                self::create_token( 'manage_logs', _t('Manage logs'), 'Administration' ); 
  • trunk/htdocs/system/classes/adminhandler.php

    r3685 r3698  
    31943194                                break; 
    31953195                        case 'users': 
    3196                         case 'user': 
    31973196                        case 'ajax_update_users': 
    31983197                        case 'ajax_users': 
    31993198                                $require_any = array( 'manage_users' => true ); 
     3199                                break; 
     3200                        case 'user': 
     3201                                $require_any = array( 'manage_users' => true, 'manage_self' => true ); 
    32003202                                break; 
    32013203                        case 'groups': 
  • trunk/htdocs/system/classes/installhandler.php

    r3682 r3698  
    14461446        } 
    14471447         
     1448        private function upgrade_db_post_3698() 
     1449        { 
     1450                ACL::create_token( 'manage_self', _t('Edit own profile'), 'Administration' ); 
     1451        } 
     1452 
    14481453        /** 
    14491454         * Validate database credentials for MySQL 
  • trunk/htdocs/system/classes/version.php

    r3539 r3698  
    1515        // DB and API versions are aligned with the SVN revision 
    1616        // number in which they last changed. 
    17         const DB_VERSION = 3539; 
     17        const DB_VERSION = 3698; 
    1818        const API_VERSION = 3124; 
    1919 
Note: See TracChangeset for help on using the changeset viewer.