[Rt-commit] [rtir] 09/12: Further doc cleanups in HasRight
Kevin Falcone
falcone at bestpractical.com
Mon Apr 14 13:16:45 EDT 2014
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.2/unwrap-hook-lexwrap
in repository rtir.
commit 50025196c9dc1dd4a2e80ca165c9e45ae175a426
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Mar 26 18:40:36 2014 -0400
Further doc cleanups in HasRight
---
lib/RT/IR.pm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index b9ac56c..34d8e95 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -764,7 +764,12 @@ if ( RT::IR->HasConstituency ) {
my %args = @_;
return $self->SUPER::HasRight(@_) unless $self->id;
+ # currently only obviously used so that one right can be checked
+ # on Incidents not Incidents - EDUNET during Constituency CF
+ # editing.
return $self->SUPER::HasRight(@_) if $self->{'disable_constituency_right_check'};
+ # Not really convinced this is right, since it gets set on $ticket->QueueObj
+ # commit messages that add it are vague about why it was added.
return $self->SUPER::HasRight(@_) if $self->{'_for_ticket'};
my $name = $self->__Value('Name');
@@ -773,6 +778,8 @@ if ( RT::IR->HasConstituency ) {
$args{'Principal'} ||= $self->CurrentUser->PrincipalObj;
+ # Avoid going to the database on every Queue->HasRight('ModifyCustomField') or any
+ # other Queue right, but in RTIR, CF rights checks at the Queue level are very heavy.
my $equiv_objects;
if ( $queue_cache->{$name} ) {
$equiv_objects = $queue_cache->{$name};
@@ -783,7 +790,6 @@ if ( RT::IR->HasConstituency ) {
$queue_cache->{$name} = $equiv_objects;
}
-
my $has_right = $args{'Principal'}->HasRight(
%args,
Object => $self,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list