From f07729b883f93aab6eaf4dffaa9b725e36c6852a Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 22 Jul 2010 16:47:43 +0000 Subject: [PATCH] allow Configuration ACL to edit templates, RT#8324 --- FS/FS/msg_template.pm | 1 + httemplate/browse/msg_template.html | 3 ++- httemplate/edit/msg_template.html | 3 ++- httemplate/edit/process/msg_template.html | 3 ++- httemplate/elements/menu.html | 3 ++- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/FS/FS/msg_template.pm b/FS/FS/msg_template.pm index 97cf50fe7..de804b6cc 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 331906ccf..0cd33c797 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 68725e243..986629cd7 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'); diff --git a/httemplate/edit/process/msg_template.html b/httemplate/edit/process/msg_template.html index 5cf88bfad..70d451b72 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'); diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index da2dcaa4c..a5bcdeb19 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.' ] -- 2.11.0