X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FAccessRight.pm;h=e90687d13ae3a131a76d13d373458e155e0a6069;hb=1b6b6467cc475a4630e051269db83381a8b779ec;hp=856a5f523e1022a6b639c269ea6847b02fdd8f8e;hpb=bb2daacbcc74b97432afebf70776230a21fa59b6;p=freeside.git diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index 856a5f523..e90687d13 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -139,6 +139,7 @@ assigned to users and/or groups. ### 'View invoices', 'Resend invoices', #NEWNEW + 'Delete invoices', #new, but no need to phase in 'View customer tax exemptions', #yow 'View customer batched payments', #NEW @@ -216,3 +217,19 @@ sub rights { @rights; } +sub default_superuser_rights { + my $class = shift; + my %omit = map { $_=>1 } ( + 'Delete customer', + 'Delete invoices', + 'Delete payment', + 'Delete credit', #? + 'Delete refund', #? + 'Raw SQL', + ); + + no warnings 'uninitialized'; + grep { ! $omit{$_} } $class->rights; +} + +1;