Ignore:
Timestamp:
12/10/15 16:49:01 (8 years ago)
Author:
Kris Deugau
Message:

/trunk

Add an ACL flag for merge operations. This is not automatically included
in the "Admin" priviledge per request, since a merge operation can
potentially wipe virtually the entire dataset. See #8.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/admin.cgi

    r709 r789  
    349349        can_del => ($acl =~ /d/ ? 1 : 0),
    350350        sysnet => ($acl =~ /s/ ? 1 : 0),
     351        can_merge => ($acl =~ /m/ ? 1 : 0),
    351352        is_admin => ($acl =~ /A/ ? 1 : 0),
    352353        acl => $acl
     
    361362  my $acl = 'b';
    362363  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.
    363367    $acl .= "acdsA";
     368    $acl .= 'm' if $webvar{merge} eq 'on';
    364369  } else {
    365370    $acl .= ($webvar{add} eq 'on' ? 'a' : '').
    366371        ($webvar{change} eq 'on' ? 'c' : '').
    367372        ($webvar{del} eq 'on' ? 'd' : '').
    368         ($webvar{sysnet} eq 'on' ? 's' : '');
     373        ($webvar{sysnet} eq 'on' ? 's' : '').
     374        ($webvar{merge} eq 'on' ? 'm' : '');
    369375  }
    370376  $page->param(acl => $acl);
Note: See TracChangeset for help on using the changeset viewer.