diff --git a/lib/RT/Record/Role/Roles.pm b/lib/RT/Record/Role/Roles.pm index a6172b419f8..c1e03fd64a0 100644 --- a/lib/RT/Record/Role/Roles.pm +++ b/lib/RT/Record/Role/Roles.pm @@ -451,6 +451,12 @@ principal Required. One of the valid roles for this record, as returned by L. +=item ACL + +Optional. A subroutine reference which will be passed the role type and +principal being removed. If it returns false, the method will fail with a +status of "Permission denied". + =back One, and only one, of I or I is required. @@ -483,7 +489,7 @@ sub DeleteRoleMember { my $acl = delete $args{ACL}; return (0, $self->loc("Permission denied")) - if $acl and not $acl->($principal); + if $acl and not $acl->($args{Type} => $principal); my $group = $self->RoleGroup( $args{Type} ); return (0, $self->loc("Role group '[_1]' not found", $args{Type}))