Changeset 142 for trunk/dns.cgi


Ignore:
Timestamp:
10/13/11 17:52:48 (13 years ago)
Author:
Kris Deugau
Message:

/trunk

Working on user-permission ACLs. Links now show or not as appropriate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dns.cgi

    r140 r142  
    823823  }
    824824
     825  list_users();
     826
     827# Permissions!
     828  $page->param(adduser => $permissions{admin} || $permissions{user_create});
     829# should we block viewing other users?  Vega blocks "editing"...
     830#  NB:  no "edit self" link as with groups here.  maybe there should be?
     831#  $page->param(eduser => $permissions{admin} || $permissions{user_edit});
     832  $page->param(deluser => $permissions{admin} || $permissions{user_delete});
     833
     834  $page->param(errmsg => $webvar{errmsg}) if $webvar{errmsg};
    825835  $page->param(curpage => $webvar{page});
    826 
    827   list_users();
    828836
    829837} elsif ($webvar{page} eq 'user') {
     
    10701078      $page->param(errmsg => $msg);
    10711079      list_users($curgroup);
     1080#Error deleting user <TMPL_VAR NAME=delusername>: <TMPL_VAR NAME=errmsg>
    10721081    } else {
    10731082      # success.  go back to the user list, do not pass "GO"
     
    18401849    $row{bg} = ($rownum++)%2;
    18411850    $row{sid} = $sid;
     1851    $row{eduser} = ($permissions{admin} || $permissions{user_edit});
     1852    $row{deluser} = ($permissions{admin} || $permissions{user_delete});
    18421853    push @userlist, \%row;
    18431854  }
Note: See TracChangeset for help on using the changeset viewer.