[Rt-commit] [rtir] 03/03: Turn off UseSQLForACLChecks when Constituencies are enabled.
Kevin Falcone
falcone at bestpractical.com
Thu Sep 25 16:15:59 EDT 2014
This is an automated email from the git hooks/post-receive script.
falcone pushed a commit to branch 3.2/test-constituencies
in repository rtir.
commit 9ad17f6bf9dd1c0b0b563912e515d0fbb752083f
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Sep 25 15:35:46 2014 -0400
Turn off UseSQLForACLChecks when Constituencies are enabled.
UseSQLForACLChecks will generate sql like
select * from main tickets where (Queue = 'Incident Reports - EDUNET' OR
Queue = 'Incidents - EDUNET' ..) and (Queue = 'Incident Reports')
if you're searching for IRs, which is an impossible WHERE and you lose.
You can 'fix' this by giving AdminCc in each of the 4 primary RTIR
queues ShowTicket rights, but this is a deviation from previous rights
and I worry about performance when we have to join for 4 different role
groups every time.
This will be better in RTIR 3.4 since we're throwing away the hack and
can just use Constituencies like real queues.
---
docs/Constituencies.pod | 17 +++++++++++++++++
lib/RT/IR/Config.pm | 10 ++++++++++
2 files changed, 27 insertions(+)
diff --git a/docs/Constituencies.pod b/docs/Constituencies.pod
index e1a8315..6f05134 100644
--- a/docs/Constituencies.pod
+++ b/docs/Constituencies.pod
@@ -368,3 +368,20 @@ Considering the above suggestion, a good way to manage users is to place
each user in a constituency specific groups based on their access needs.
Place users into DutyTeam only if they should work with all constituencies.
+=head2 Constituency issues
+
+Constituencies are very heavyweight, they add extra code to many
+permission checks in the system and also greatly complicate the number
+of groups and group members in the system. If you are not going to use
+this functionality, you would be well served to disable the Constituency
+Custom Field, which will cause RTIR to remove a number of added
+complexities.
+
+Additionaly, while RT 4.2 has shipped with the config option
+C<$UseSQLForACLChecks> defaulted on, it is not compatible with Constituencies.
+If RTIR detects that it is being started with Constituencies enabled it
+will disabled C<$UseSQLForACLChecks>. Overriding this means that any
+part of the UI trying to show a list of tickets (such as the RTIR
+homepage or any search results) will be empty for users in restricted
+Constituency DutyTeams.
+
diff --git a/lib/RT/IR/Config.pm b/lib/RT/IR/Config.pm
index 326e6be..c0de127 100644
--- a/lib/RT/IR/Config.pm
+++ b/lib/RT/IR/Config.pm
@@ -94,6 +94,16 @@ sub Init {
RT->Config->Set(HomepageComponents => \@homepage_components);
+ $RT::Config::META{UseSQLForACLChecks}{PostLoadCheck} = sub {
+ my ($self,$value) = @_;
+ if ( RT::IR->HasConstituency ) {
+ if ( $value ) {
+ $self->Set('UseSQLForACLChecks',0);
+ RT->Logger->info('Disabling UseSQLForACLChecks because Constituencies are in use. If you are not using Constituencies, you can disable that Custom Field.');
+ }
+ }
+ };
+
return;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list