Commit af64dc21 authored by Kevin Falcone's avatar Kevin Falcone
Browse files

Remove more _RTIR prefix code

This use of _RTIR was missed during the renaming before 2.6.
Without 1b6ac90c and this commit, this script really only about 1/3
worked for the whole 2.6 release series. Constituency duty teams had
many permissions on tickets, but no access to the relevant custom fields
unless more work was done to hand those rights out manually.

This takes any CF applied to an IR queue and grants the constituency
duty team rights on those CFs. This means that new custom CFs added by
an admin will be picked up (not just core RTIR fields) but this is more
likely to be what admins want and is simpler than coding a list of CFs
into the script that will bitrot.
parent 05ef4c1f
......@@ -268,7 +268,10 @@ sub grant_group_cf_rights {
my @rights = (@_);
my $cfs = RT::CustomFields->new($RT::SystemUser);
$cfs->Limit( FIELD => 'Name', OPERATOR => 'STARTSWITH', VALUE => '_RTIR' );
for my $queue (@queue_prefixes) {
my $q = load_queue($queue);
while ( my $cf = $cfs->Next ) {
debug "Granting rights for custom field ". $cf->Name . " to group ". $group->Name;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment