Changeset 789 for trunk/cgi-bin
- Timestamp:
- 12/10/15 16:49:01 (9 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/admin.cgi
r709 r789 349 349 can_del => ($acl =~ /d/ ? 1 : 0), 350 350 sysnet => ($acl =~ /s/ ? 1 : 0), 351 can_merge => ($acl =~ /m/ ? 1 : 0), 351 352 is_admin => ($acl =~ /A/ ? 1 : 0), 352 353 acl => $acl … … 361 362 my $acl = 'b'; 362 363 if ($webvar{admin} eq 'on') { 364 # as per request "admin" users do not automatically get merge permission. Networkz iz hard. 365 # Admin users that add the priviledge and then shoot everybody in all the feet probably 366 # shouldn't have had admin access in the first place. 363 367 $acl .= "acdsA"; 368 $acl .= 'm' if $webvar{merge} eq 'on'; 364 369 } else { 365 370 $acl .= ($webvar{add} eq 'on' ? 'a' : ''). 366 371 ($webvar{change} eq 'on' ? 'c' : ''). 367 372 ($webvar{del} eq 'on' ? 'd' : ''). 368 ($webvar{sysnet} eq 'on' ? 's' : ''); 373 ($webvar{sysnet} eq 'on' ? 's' : ''). 374 ($webvar{merge} eq 'on' ? 'm' : ''); 369 375 } 370 376 $page->param(acl => $acl); -
trunk/cgi-bin/main.cgi
r788 r789 1063 1063 1064 1064 # Need to find internal knobs to twist to actually vary these. (Ab)use "change" flag for now 1065 $page->param(maymerge => ($IPDBacl{$authuser} =~ /c/ && $blockinfo->{type} !~ /^.i$/)); 1065 $page->param(maymerge => ($IPDBacl{$authuser} =~ /m/ && $blockinfo->{type} !~ /^.i$/)); 1066 1066 1067 if ($IPDBacl{$authuser} =~ /c/ && $blockinfo->{type} !~ /^.i$/) { 1067 1068 if ($blockinfo->{type} =~ /^.p$/) { … … 1323 1324 # Set up for merge 1324 1325 sub prepMerge { 1326 if ($IPDBacl{$authuser} !~ /m/) { 1327 $aclerr = 'mergeblock'; 1328 return; 1329 } 1330 1325 1331 my $binfo = getBlockData($ip_dbh, $webvar{block}); 1326 1332 … … 1348 1354 # Show what will be merged, present warnings about data loss 1349 1355 sub confMerge { 1356 if ($IPDBacl{$authuser} !~ /m/) { 1357 $aclerr = 'mergeblock'; 1358 return; 1359 } 1360 1350 1361 if (!$webvar{newmask} || $webvar{newmask} !~ /^\d+$/) { 1351 1362 $page->param(err => 'New netmask required'); … … 1387 1398 # Make it so 1388 1399 sub doMerge { 1400 if ($IPDBacl{$authuser} !~ /m/) { 1401 $aclerr = 'mergeblock'; 1402 return; 1403 } 1404 1389 1405 if (!$webvar{newmask} || $webvar{newmask} !~ /^\d+$/) { 1390 1406 $page->param(err => 'New netmask required');
Note:
See TracChangeset
for help on using the changeset viewer.