summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2010-07-22 16:47:43 +0000
committerivan <ivan>2010-07-22 16:47:43 +0000
commitf07729b883f93aab6eaf4dffaa9b725e36c6852a (patch)
tree931ec95bf8aca4c45fa89c940e70cf489baa18ee
parentf4658067b9a1dd0564be8fd590a1e541681bfe27 (diff)
allow Configuration ACL to edit templates, RT#8324
-rw-r--r--FS/FS/msg_template.pm1
-rw-r--r--httemplate/browse/msg_template.html3
-rw-r--r--httemplate/edit/msg_template.html3
-rw-r--r--httemplate/edit/process/msg_template.html3
-rw-r--r--httemplate/elements/menu.html3
5 files changed, 9 insertions, 4 deletions
diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm
index 97cf50f..de804b6 100644
--- a/FS/FS/msg_template.pm
+++ b/FS/FS/msg_template.pm
@@ -123,6 +123,7 @@ sub check {
|| $self->ut_text('msgname')
|| $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum')
|| $self->ut_textn('mime_type')
+ || $self->ut_anything('subject')
|| $self->ut_anything('body')
|| $self->ut_enum('disabled', [ '', 'Y' ] )
;
diff --git a/httemplate/browse/msg_template.html b/httemplate/browse/msg_template.html
index 331906c..0cd33c7 100644
--- a/httemplate/browse/msg_template.html
+++ b/httemplate/browse/msg_template.html
@@ -20,7 +20,8 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Edit templates')
- || $FS::CurrentUser::CurrentUser->access_right('Edit global templates');
+ || $FS::CurrentUser::CurrentUser->access_right('Edit global templates')
+ || $FS::CurrentUser::CurrentUser->access_right('Configuration');
my $link = [ "${p}edit/msg_template.html?", 'msgnum' ];
diff --git a/httemplate/edit/msg_template.html b/httemplate/edit/msg_template.html
index 68725e2..986629c 100644
--- a/httemplate/edit/msg_template.html
+++ b/httemplate/edit/msg_template.html
@@ -17,6 +17,7 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Edit templates')
- || $FS::CurrentUser::CurrentUser->access_right('Edit global templates');
+ || $FS::CurrentUser::CurrentUser->access_right('Edit global templates')
+ || $FS::CurrentUser::CurrentUser->access_right('Configuration');
</%init>
diff --git a/httemplate/edit/process/msg_template.html b/httemplate/edit/process/msg_template.html
index 5cf88bf..70d451b 100644
--- a/httemplate/edit/process/msg_template.html
+++ b/httemplate/edit/process/msg_template.html
@@ -7,6 +7,7 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Edit templates')
- || $FS::CurrentUser::CurrentUser->access_right('Edit global templates');
+ || $FS::CurrentUser::CurrentUser->access_right('Edit global templates')
+ || $FS::CurrentUser::CurrentUser->access_right('Configuration');
</%init>
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html
index da2dcaa..a5bcdeb 100644
--- a/httemplate/elements/menu.html
+++ b/httemplate/elements/menu.html
@@ -475,7 +475,8 @@ tie my %config_phone, 'Tie::IxHash',
tie my %config_misc, 'Tie::IxHash';
$config_misc{'Message templates'} = [ $fsurl.'browse/msg_template.html', 'Templates for customer notices' ]
if $curuser->access_right('Edit templates')
- || $curuser->access_right('Edit global templates');
+ || $curuser->access_right('Edit global templates')
+ || $curuser->access_right('Configuration');
$config_misc{'Tags'} = [ $fsurl.'browse/part_tag.html', '' ]
if $curuser->access_right('Configuration');
$config_misc{'Advertising sources'} = [ $fsurl.'browse/part_referral.html', 'Where a customer heard about your service.' ]