[freeside-commits] freeside/httemplate/edit cust_main_attach.cgi, 1.1, 1.2
Mark Wells
mark at wavetail.420.am
Mon Aug 10 16:04:59 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv15451/httemplate/edit
Modified Files:
cust_main_attach.cgi
Log Message:
Improve handling of deleted attachments
Index: cust_main_attach.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main_attach.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cust_main_attach.cgi 9 Aug 2009 09:05:37 -0000 1.1
+++ cust_main_attach.cgi 10 Aug 2009 23:04:57 -0000 1.2
@@ -24,7 +24,7 @@
<INPUT TYPE="submit" NAME="submit"
VALUE="<% $attachnum ? "Apply Changes" : "Upload File" %>">
-% if(defined $attach) {
+% if(defined $attach and $curuser->access_right('Delete attachment')) {
<BR>
<INPUT TYPE="submit" NAME="delete" value="Delete File">
% }
@@ -35,6 +35,7 @@
<%init>
+my $curuser = $FS::CurrentUser::CurrentUser;
my $attachnum = '';
my $attach;
if ( $cgi->param('error') ) {
@@ -52,7 +53,7 @@
my $action = $attachnum ? 'Edit' : 'Add';
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right("$action customer note");
+ unless $curuser->access_right("$action customer note");
</%init>
More information about the freeside-commits
mailing list