Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r389 r390 59 59 &mailNotify 60 60 %typemap %reverse_typemap %config 61 %permissions @permtypes $permlist 61 %permissions @permtypes $permlist %permchains 62 62 ); 63 63 … … 86 86 &mailNotify 87 87 %typemap %reverse_typemap %config 88 %permissions @permtypes $permlist 88 %permissions @permtypes $permlist %permchains 89 89 )] 90 90 ); … … 120 120 ); 121 121 our $permlist = join(',',@permtypes); 122 123 # Some permissions more or less require certain others. 124 our %permchains = ( 125 user_edit => 'self_edit', 126 location_edit => 'location_view', 127 location_create => 'location_view', 128 location_delete => 'location_view', 129 record_locchg => 'location_view', 130 ); 122 131 123 132 # DNS record type map and reverse map. -
trunk/dns.cgi
r389 r390 956 956 } 957 957 } 958 # "Chained" permissions. Some permissions imply others; make sure they get set. 959 foreach (keys %permchains) { 960 if ($chperms{$_} && !$chperms{$permchains{$_}}) { 961 $chperms{$permchains{$_}} = 1; 962 } 963 } 958 964 my ($code,$msg) = changePermissions($dbh, 'group', $webvar{gid}, \%chperms); 959 965 if ($code eq 'OK') { … … 1180 1186 } else { 1181 1187 $permstring = 'i'; 1188 } 1189 # "Chained" permissions. Some permissions imply others; make sure they get set. 1190 foreach (keys %permchains) { 1191 if ($newperms{$_} && !$newperms{$permchains{$_}}) { 1192 $newperms{$permchains{$_}} = 1; 1193 $permstring .= ",$permchains{$_}"; 1194 } 1182 1195 } 1183 1196 if ($webvar{useraction} eq 'add') {
Note:
See TracChangeset
for help on using the changeset viewer.