Skip to content

Commit

Permalink
Merge branch '4.2/remove-role-acl' into 4.2-trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
jibsheet committed Feb 14, 2014
2 parents 2357028 + fb67b69 commit cce632b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/RT/Record/Role/Roles.pm
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,12 @@ principal
Required. One of the valid roles for this record, as returned by L</Roles>.
=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<PrincipalId> or I<User> is required.
Expand Down Expand Up @@ -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}))
Expand Down

0 comments on commit cce632b

Please sign in to comment.