[Rt-commit] rt branch, 4.4/auto-create-missing-queue-custom-roles, created. rt-4.4.3-105-g064f429bf
? sunnavy
sunnavy at bestpractical.com
Fri Dec 14 12:51:45 EST 2018
The branch, 4.4/auto-create-missing-queue-custom-roles has been created
at 064f429bf4ad51be9ac706715f7cfc2b6b24dad0 (commit)
- Log -----------------------------------------------------------------
commit 064f429bf4ad51be9ac706715f7cfc2b6b24dad0
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Dec 14 05:26:59 2018 +0800
Allow to create missing queue-level custom role groups when needed
Since ticket level custom role groups could be automatically created,
queue level ones should have the same behavior, not mentioning the
behavior is also consistent with default role groups.
diff --git a/lib/RT/CustomRole.pm b/lib/RT/CustomRole.pm
index 8c9b08451..9dc6d6f46 100644
--- a/lib/RT/CustomRole.pm
+++ b/lib/RT/CustomRole.pm
@@ -172,9 +172,9 @@ sub _RegisterAsRole {
$role->Load($id);
if ($object->isa('RT::Queue')) {
- # there's no way to apply the custom
- # role to a queue before that queue is created
- return 0;
+ # In case queue level custom role groups got deleted
+ # somehow. Allow to re-create them like default ones.
+ return $role->IsAdded($object->id);
}
elsif ($object->isa('RT::Ticket')) {
# see if the role has been applied to the ticket's queue
-----------------------------------------------------------------------
More information about the rt-commit
mailing list