Changeset 178
- Timestamp:
- 12/02/11 13:19:15 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r177 r178 754 754 $session->clear('resultmsg'); 755 755 } 756 if ($session->param('warnmsg')) { 757 $page->param(warnmsg => $session->param('warnmsg')); 758 $session->clear('warnmsg'); 759 } 756 760 if ($session->param('errmsg')) { 757 761 $page->param(errmsg => $session->param('errmsg')); … … 841 845 getPermissions($dbh, 'group', $webvar{gid}, \%curperms); 842 846 my %chperms; 847 my $alterperms = 0; 843 848 foreach (@permtypes) { 844 849 $webvar{$_} = 0 if !defined($webvar{$_}); 845 850 $webvar{$_} = 1 if $webvar{$_} eq 'on'; 846 $chperms{$_} = $webvar{$_} if $curperms{$_} ne $webvar{$_}; 851 if ($permissions{admin} || $permissions{$_}) { 852 $chperms{$_} = $webvar{$_} if $curperms{$_} ne $webvar{$_}; 853 } else { 854 $alterperms = 1; 855 $chperms{$_} = 0; 856 } 847 857 } 848 858 my ($code,$msg) = changePermissions($dbh, 'group', $webvar{gid}, \%chperms); … … 850 860 logaction(0, $session->param("username"), $webvar{gid}, 851 861 "Updated default permissions in group $webvar{gid} (".groupName($dbh, $webvar{gid}).")"); 852 changepage(page => "grpman", resultmsg => 853 "Updated default permissions in group ".groupName($dbh, $webvar{gid})); 862 if ($alterperms) { 863 changepage(page => "grpman", warnmsg => 864 "You can only grant permissions you hold. Default permissions in group ". 865 groupName($dbh, $webvar{gid})." updated with reduced access"); 866 } else { 867 changepage(page => "grpman", resultmsg => 868 "Updated default permissions in group ".groupName($dbh, $webvar{gid})); 869 } 854 870 } 855 871 # no point in doing extra work -
trunk/templates/grpman.tmpl
r147 r178 8 8 <div class="result"><TMPL_VAR NAME=resultmsg></div> 9 9 </TMPL_IF> 10 <TMPL_IF warnmsg> 11 <div class="warning">Warning: <TMPL_VAR NAME=warnmsg></div> 12 </TMPL_IF> 10 13 <TMPL_IF errmsg> 11 <div class= 'errmsg'><TMPL_VAR NAME=errmsg></div>14 <div class="errmsg"><TMPL_VAR NAME=errmsg></div> 12 15 </TMPL_IF> 13 16
Note:
See TracChangeset
for help on using the changeset viewer.