Changeset 188 for trunk/dns.cgi
- Timestamp:
- 12/06/11 16:40:04 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r187 r188 289 289 $flag = 1 if isParent($dbh, $_, 'group', $webvar{id}, 'domain'); 290 290 } 291 if ($flag && ($permissions{admin} || $permissions{ edit_domain})) {291 if ($flag && ($permissions{admin} || $permissions{domain_edit})) { 292 292 my $stat = domStatus($dbh,$webvar{id},$webvar{domstatus}); 293 ##fixme switch to more consise "Enabled <domain"/"Disabled <domain>" as with users? 293 294 logaction($webvar{id}, $session->param("username"), parentID($webvar{id}, 'dom', 'group'), 294 295 "Changed ".domainName($dbh, $webvar{id})." state to ".($stat ? 'active' : 'inactive')); 296 $page->param(resultmsg => "Changed ".domainName($dbh, $webvar{id})." state to ". 297 ($stat ? 'active' : 'inactive')); 295 298 } else { 296 299 $page->param(errmsg => "You are not permitted to view or change the requested domain"); 297 300 } 301 $uri_self =~ s/\&domstatus=[^&]*//g; # clean up URL for stuffing into templates 298 302 } 299 303 … … 1069 1073 $flag = 1 if isParent($dbh, $_, 'group', $webvar{id}, 'user'); 1070 1074 } 1071 if ($flag) { 1072 userStatus($dbh,$webvar{id},$webvar{userstatus}); 1075 if ($flag && ($permissions{admin} || $permissions{user_edit})) { 1076 my $stat = userStatus($dbh,$webvar{id},$webvar{userstatus}); 1077 logaction(0, $session->param("username"), parentID($webvar{id}, 'user', 'group'), 1078 ($stat ? 'Enabled' : 'Disabled')." ".userFullName($dbh, $webvar{id}, '%u')); 1079 $page->param(resultmsg => ($stat ? 'Enabled' : 'Disabled')." ".userFullName($dbh, $webvar{id}, '%u')); 1073 1080 } else { 1074 1081 $page->param(errmsg => "You are not permitted to view or change the requested user"); 1075 1082 } 1083 $uri_self =~ s/\&userstatus=[^&]*//g; # clean up URL for stuffing into templates 1076 1084 } 1077 1085
Note:
See TracChangeset
for help on using the changeset viewer.