[Rt-commit] rt branch, new-style-templates, updated. rt-3.8.8-232-g3475a11
Shawn Moore
sartak at bestpractical.com
Fri Jul 30 16:16:38 EDT 2010
The branch, new-style-templates has been updated
via 3475a111716789d45cf6e5be68e63ae53c77d26c (commit)
from b6bd18b1547d89e17a4438cbbb80e9ae66c025f1 (commit)
Summary of changes:
etc/upgrade/3.9.1/content | 6 +++---
lib/RT/Scrip_Overlay.pm | 4 ++--
lib/RT/System.pm | 2 +-
lib/RT/Template_Overlay.pm | 6 +++---
t/web/template.t | 8 ++++----
5 files changed, 13 insertions(+), 13 deletions(-)
- Log -----------------------------------------------------------------
commit 3475a111716789d45cf6e5be68e63ae53c77d26c
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Fri Jul 30 16:18:31 2010 -0400
s/ExecutePerl/ExecuteCode/g
diff --git a/etc/upgrade/3.9.1/content b/etc/upgrade/3.9.1/content
index 5f204ee..5acb4a5 100644
--- a/etc/upgrade/3.9.1/content
+++ b/etc/upgrade/3.9.1/content
@@ -25,7 +25,7 @@
},
sub {
use strict;
- $RT::Logger->debug('Adding ExecutePerl right to principals that currently have ModifyTemplate');
+ $RT::Logger->debug('Adding ExecuteCode right to principals that currently have ModifyTemplate');
my $acl = RT::ACL->new($RT::SystemUser);
$acl->Limit(
@@ -38,12 +38,12 @@
my $principal = $ace->PrincipalObj;
my ($ok, $msg) = $principal->GrantRight(
- Right => 'ExecutePerl',
+ Right => 'ExecuteCode',
Object => $RT::SystemUser,
);
if (!$ok) {
- $RT::Logger->warn("Unable to grant ExecutePerl on principal " . $principal->id . ": $msg");
+ $RT::Logger->warn("Unable to grant ExecuteCode on principal " . $principal->id . ": $msg");
}
}
},
diff --git a/lib/RT/Scrip_Overlay.pm b/lib/RT/Scrip_Overlay.pm
index ccdd418..376e69b 100755
--- a/lib/RT/Scrip_Overlay.pm
+++ b/lib/RT/Scrip_Overlay.pm
@@ -108,7 +108,7 @@ sub Create {
if (length($args{CustomPrepareCode}) || length($args{CustomCommitCode}) || length($args{CustomIsApplicableCode})) {
unless ( $self->CurrentUser->HasRight( Object => $RT::System,
- Right => 'ExecutePerl' ) )
+ Right => 'ExecuteCode' ) )
{
return ( 0, $self->loc('Permission Denied') );
}
@@ -527,7 +527,7 @@ sub _Set {
if (length($args{Value})) {
if ($args{Field} eq 'CustomIsApplicableCode' || $args{Field} eq 'CustomPrepareCode' || $args{Field} eq 'CustomCommitCode') {
unless ( $self->CurrentUser->HasRight( Object => $RT::System,
- Right => 'ExecutePerl' ) ) {
+ Right => 'ExecuteCode' ) ) {
return ( 0, $self->loc('Permission Denied') );
}
}
diff --git a/lib/RT/System.pm b/lib/RT/System.pm
index 226d748..23dcda0 100755
--- a/lib/RT/System.pm
+++ b/lib/RT/System.pm
@@ -89,7 +89,7 @@ our $RIGHTS = {
ShowApprovalsTab => "show Approvals tab", # loc_pair
LoadSavedSearch => "allow loading of saved searches", # loc_pair
CreateSavedSearch => "allow creation of saved searches", # loc_pair
- ExecutePerl => "allow writing Perl code in templates, scrips, etc", # loc_pair
+ ExecuteCode => "allow writing Perl code in templates, scrips, etc", # loc_pair
};
# Tell RT::ACE that this sort of object can get acls granted
diff --git a/lib/RT/Template_Overlay.pm b/lib/RT/Template_Overlay.pm
index 5178fb2..477b0a2 100755
--- a/lib/RT/Template_Overlay.pm
+++ b/lib/RT/Template_Overlay.pm
@@ -211,7 +211,7 @@ sub Create {
@_
);
- if ( $args{Type} eq 'Perl' && !$self->CurrentUser->HasRight(Right => 'ExecutePerl', Object => $RT::System) ) {
+ if ( $args{Type} eq 'Perl' && !$self->CurrentUser->HasRight(Right => 'ExecuteCode', Object => $RT::System) ) {
return ( undef, $self->loc('Permission Denied') );
}
@@ -595,7 +595,7 @@ sub CurrentUserHasQueueRight {
=head2 SetType
-If setting Type to Perl, require the ExecutePerl right.
+If setting Type to Perl, require the ExecuteCode right.
=cut
@@ -603,7 +603,7 @@ sub SetType {
my $self = shift;
my $NewType = shift;
- if ($NewType eq 'Perl' && !$self->CurrentUser->HasRight(Right => 'ExecutePerl', Object => $RT::System)) {
+ if ($NewType eq 'Perl' && !$self->CurrentUser->HasRight(Right => 'ExecuteCode', Object => $RT::System)) {
return ( undef, $self->loc('Permission Denied') );
}
diff --git a/t/web/template.t b/t/web/template.t
index aee9fca..8b06f53 100644
--- a/t/web/template.t
+++ b/t/web/template.t
@@ -47,17 +47,17 @@ $m->submit;
$m->title_is(q{Modify template Resolved}, 'modifying the Resolved template');
$m->form_name('ModifyTemplate');
-is($m->value('Type'), 'Simple', 'need the ExecutePerl right to update Type to Perl');
+is($m->value('Type'), 'Simple', 'need the ExecuteCode right to update Type to Perl');
$m->content_contains('Permission Denied');
ok( RT::Test->add_rights(
- { Principal => $user_a, Right => [qw(ExecutePerl)] },
-), 'add ExecutePerl rights');
+ { Principal => $user_a, Right => [qw(ExecuteCode)] },
+), 'add ExecuteCode rights');
$m->field(Type => 'Perl');
$m->submit;
$m->title_is(q{Modify template Resolved}, 'modifying the Resolved template');
$m->form_name('ModifyTemplate');
-is($m->value('Type'), 'Perl', 'now that we have ExecutePerl we can update Type to Perl');
+is($m->value('Type'), 'Perl', 'now that we have ExecuteCode we can update Type to Perl');
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list