From: ivan Date: Sun, 13 Jan 2008 20:46:44 +0000 (+0000) Subject: ACLs X-Git-Tag: TRIXBOX_2_6~115 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=f9938915b0df2609f41c24d761d607595d5d0a34 ACLs --- diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi index c5373ff19..951725531 100755 --- a/httemplate/view/cust_bill.cgi +++ b/httemplate/view/cust_bill.cgi @@ -1,5 +1,4 @@ <% include("/elements/header.html",'Invoice View', menubar( - "Main Menu" => $p, "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum", )) %> diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index 5af34c09c..19332f35d 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -126,10 +126,12 @@ % #completely unapplied % $pre = 'Unapplied '; % $post = ''; -% $apply = qq! (apply)!; -% +% if ( $curuser->access_right('Apply payment') # ) { +% || $curuser->access_right('Post payment') ) { #remove after 1.7.3 +% $apply = qq! (apply)!; +% } % } elsif ( scalar(@cust_bill_pay) == 1 % && scalar(@cust_pay_refund) == 0 % && $cust_pay->unapplied == 0 ) { @@ -163,11 +165,14 @@ % if ( $cust_pay->unapplied > 0 ) { % $desc .= '  '. % '$'. -% $cust_pay->unapplied. ' unapplied'. -% qq! (apply)!. -% '
'; +% $cust_pay->unapplied. ' unapplied'; +% if ( $curuser->access_right('Apply payment') # ) { +% || $curuser->access_right('Post payment') ) { #remove after 1.7.3 +% $desc .= qq! (apply)!; +% } +% $desc .= '
'; % } % } % @@ -301,9 +306,12 @@ % #completely unapplied % $pre = 'Unapplied '; % $post = ''; -% $apply = qq! (apply)!; +% if ( $curuser->access_right('Apply credit') # ) { +% || $curuser->access_right('Post credit') ) { #remove after 1.7.3 +% $apply = qq! (apply)!; +% } % } elsif ( scalar(@cust_credit_bill) == 1 % && scalar(@cust_credit_refund) == 0 % && $cust_credit->credited == 0 ) { @@ -336,11 +344,14 @@ % } % if ( $cust_credit->credited > 0 ) { % $desc .= '  $'. -% $cust_credit->credited. ' unapplied'. -% qq! (apply)!. -% '
'; +% $cust_credit->credited. ' unapplied'; +% if ( $curuser->access_right('Apply credit') # ) { +% || $curuser->access_right('Post credit') ) { #remove after 1.7.3 +% $desc .= qq! (apply)!; +% } +% $desc .= '
'; % } % } %# diff --git a/httemplate/view/elements/svc_Common.html b/httemplate/view/elements/svc_Common.html index f5b65ac49..0500248b1 100644 --- a/httemplate/view/elements/svc_Common.html +++ b/httemplate/view/elements/svc_Common.html @@ -90,8 +90,7 @@ Service #<% $svcnum %> <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('View customer services') - || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me + unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); my(%opt) = @_; diff --git a/httemplate/view/svc_acct.cgi b/httemplate/view/svc_acct.cgi index d764afee6..e6d2b690f 100755 --- a/httemplate/view/svc_acct.cgi +++ b/httemplate/view/svc_acct.cgi @@ -90,38 +90,42 @@
% } - - -
- - -% #print qq!
Send account information!; +% my @part_svc = (); +% if ($FS::CurrentUser::CurrentUser->access_right('Change customer service')) { + + + + + + + +% #print qq!
Send account information!; % -% my @part_svc = (); -% if ( $pkgnum ) { -% @part_svc = grep { $_->svcdb eq 'svc_acct' -% && $_->svcpart != $part_svc->svcpart } -% $cust_pkg->available_part_svc; -% } else { -% @part_svc = qsearch('part_svc', { -% svcdb => 'svc_acct', -% disabled => '', -% svcpart => { op=>'!=', value=>$part_svc->svcpart }, -% } ); -% } +% if ( $pkgnum ) { +% @part_svc = grep { $_->svcdb eq 'svc_acct' +% && $_->svcpart != $part_svc->svcpart } +% $cust_pkg->available_part_svc; +% } else { +% @part_svc = qsearch('part_svc', { +% svcdb => 'svc_acct', +% disabled => '', +% svcpart => { op=>'!=', value=>$part_svc->svcpart }, +% } ); +% } % - +% } Service #<% $svcnum %> | Edit this service + % if ( @part_svc ) { | + % } @@ -330,8 +335,7 @@ Service #<% $svcnum %> <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('View customer services') - || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me + unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); my $conf = new FS::Conf; diff --git a/httemplate/view/svc_broadband.cgi b/httemplate/view/svc_broadband.cgi index a76e5a3d1..e614fe418 100644 --- a/httemplate/view/svc_broadband.cgi +++ b/httemplate/view/svc_broadband.cgi @@ -4,8 +4,7 @@ ) : ( "Cancel this (unaudited) website" => "${p}misc/cancel-unaudited.cgi?$svcnum" ) - ), - "Main menu" => $p, + ) )) %> @@ -144,8 +143,7 @@ Add router named <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('View customer services') - || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me + unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); my($query) = $cgi->keywords; $query =~ /^(\d+)$/; diff --git a/httemplate/view/svc_domain.cgi b/httemplate/view/svc_domain.cgi index 8653c4f42..a58d75ed6 100755 --- a/httemplate/view/svc_domain.cgi +++ b/httemplate/view/svc_domain.cgi @@ -4,14 +4,19 @@ ) : ( "Delete this (unaudited) domain" => "javascript:areyousure('${p}misc/cancel-unaudited.cgi?$svcnum', 'Delete $domain and all records?' )" ) - ), - "Main menu" => $p, + ) )) %> Service #<% $svcnum %>
Service: <% $part_svc->svc %>
Domain name: <% $domain %> -
Catch all email (change): +
Catch all email +% if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain catchall') ) { +
Catch all email(change): +} else { +
Catch all email: +% } + <% $email ? "$email" : "(none)" %>

View whois information.

@@ -50,7 +55,9 @@ Service #<% $svcnum %> <% $type %> <% $domain_record->recdata %> -% unless ( $domain_record->rectype eq 'SOA' ) { +% unless ( $domain_record->rectype eq 'SOA' +% || ! $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') +% ) { % ( my $recdata = $domain_record->recdata ) =~ s/"/\\'\\'/g; (delete) % } @@ -69,42 +76,50 @@ Service #<% $svcnum %> % } +% if ( $FS::CurrentUser::CurrentUser->access_right('Edit domain nameservice') ) { +
+ + + + IN + + + + + +

+ or +

+ +
+ +% if ( @records ) { + Delete all records and +% } + Slave from nameserver IP + + + + + + +
+ +% } -
-
- - - IN - - -


or

-
- -% if ( @records ) { - Delete all records and -% } +

-Slave from nameserver IP - - - - - -
-

<% joblisting({'svcnum'=>$svcnum}, 1) %> +<% joblisting({'svcnum'=>$svcnum}, 1) %> <% include('/elements/footer.html') %> <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('View customer services') - || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me + unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); my($query) = $cgi->keywords; $query =~ /^(\d+)$/; diff --git a/httemplate/view/svc_external.cgi b/httemplate/view/svc_external.cgi index b87166a17..553d2362a 100644 --- a/httemplate/view/svc_external.cgi +++ b/httemplate/view/svc_external.cgi @@ -5,7 +5,6 @@ : ( "Cancel this (unaudited) external service" => "${p}misc/cancel-unaudited.cgi?$svcnum" ) ), - "Main menu" => $p, )) %> Edit this information
@@ -30,8 +29,7 @@ <%init> die "access denied" - unless $FS::CurrentUser::CurrentUser->access_right('View customer services') - || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me + unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); my($query) = $cgi->keywords; $query =~ /^(\d+)$/; diff --git a/httemplate/view/svc_forward.cgi b/httemplate/view/svc_forward.cgi index 487ebb220..745147761 100755 --- a/httemplate/view/svc_forward.cgi +++ b/httemplate/view/svc_forward.cgi @@ -1,6 +1,5 @@ % die "access denied" -% unless $FS::CurrentUser::CurrentUser->access_right('View customer services') -% || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me +% unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); % %my $conf = new FS::Conf; % @@ -38,8 +37,7 @@ % ) % : ( "Cancel this (unaudited) mail forward" => % "${p}misc/cancel-unaudited.cgi?$svcnum" ) -% ), -% "Main menu" => $p, +% ) %)); % %my($srcsvc,$dstsvc,$dst) = ( diff --git a/httemplate/view/svc_www.cgi b/httemplate/view/svc_www.cgi index 37f186465..d6d458ca5 100644 --- a/httemplate/view/svc_www.cgi +++ b/httemplate/view/svc_www.cgi @@ -1,6 +1,5 @@ % die "access denied" -% unless $FS::CurrentUser::CurrentUser->access_right('View customer services') -% || $FS::CurrentUser::CurrentUser->access_right('View customer'); #XXX remove me +% unless $FS::CurrentUser::CurrentUser->access_right('View customer services'); % %my($query) = $cgi->keywords; %$query =~ /^(\d+)$/;