Ignore:
Timestamp:
Sep 11, 2007, 4:24:51 AM (17 years ago)
Author:
rvelices
Message:

feature 731: permissions at image level

  • this is the first version - I wait for feedback before changing help files
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/user_list.php

    r2041 r2084  
    9898                ui.status,
    9999                ui.adviser,
    100                 ui.enabled_high
     100                ui.enabled_high,
     101                ui.level
    101102  FROM '.USERS_TABLE.' AS u
    102103    INNER JOIN '.USER_INFOS_TABLE.' AS ui
     
    257258    array_push($page['errors'], l10n('Guest cannot be deleted'));
    258259  }
    259   if (($conf['guest_id'] != $conf['default_user_id']) and 
     260  if (($conf['guest_id'] != $conf['default_user_id']) and
    260261      in_array($conf['default_user_id'], $collection))
    261262  {
     
    352353    array('nb_image_line', 'nb_line_page', 'template', 'language',
    353354          'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
    354           'show_nb_hits', 'maxheight', 'status', 'enabled_high');
    355 
    356   $true_false_fields = array('expand', 'show_nb_comments',
     355          'show_nb_hits', 'maxheight', 'status', 'enabled_high',
     356          'level');
     357
     358  $true_false_fields = array('expand', 'show_nb_comments',
    357359                       'show_nb_hits', 'enabled_high');
    358360  if ($conf['allow_adviser'])
     
    757759}
    758760
     761// user level options
     762$blockname = 'level_option';
     763foreach ($conf['available_permission_levels'] as $level)
     764{
     765  $template->assign_block_vars(
     766    $blockname,
     767    array(
     768      'VALUE' => $level,
     769      'CONTENT' => l10n( sprintf('Level %d', $level) ),
     770      'SELECTED' => $level==$default_user['level'] ? 'selected="selected"' : '',
     771      ));
     772}
     773
    759774// +-----------------------------------------------------------------------+
    760775// |                            navigation bar                             |
     
    818833    $checked = '';
    819834  }
     835
     836  $properties = array();
     837  $properties[] =
     838    (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
     839        ? $lang['is_high_enabled'] : $lang['is_high_disabled'];
     840
     841  $properties[] = l10n( sprintf('Level %d', $local_user['level']) );
    820842
    821843  $template->assign_block_vars(
     
    837859      'EMAIL' => get_email_address_as_display_text($local_user['email']),
    838860      'GROUPS' => $groups_string,
    839       'PROPERTIES' =>
    840         (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
    841         ? $lang['is_high_enabled'] : $lang['is_high_disabled']
     861      'PROPERTIES' => implode( ',', $properties),
     862
    842863      )
    843864    );
Note: See TracChangeset for help on using the changeset viewer.