[Rt-commit] rt branch, 4.2/fix-can-set-owner-logic-for-take-and-steal, updated. rt-4.2.1-70-g136c706
Alex Vandiver
alexmv at bestpractical.com
Tue Dec 31 16:57:16 EST 2013
The branch, 4.2/fix-can-set-owner-logic-for-take-and-steal has been updated
via 136c70656766e3352870a5dc1c4e333f795f6bfc (commit)
from b314742a36bc04b92a87d68b97fcea4f14640b42 (commit)
Summary of changes:
lib/RT/Ticket.pm | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 136c70656766e3352870a5dc1c4e333f795f6bfc
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Tue Dec 31 16:57:01 2013 -0500
Expand on the CurrentUserCanSetOwner documentation slightly
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index b41b964..6c21b37 100644
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -2064,6 +2064,9 @@ are owned by Nobody because that is the context appropriate for the
TakeTicket right. If you need to strictly test a user for a right,
use HasRight to check for the right directly.
+For some custom types of owner changes (C<Take> and C<Steal>), it also
+verifies that those actions are possible given the current ticket owner.
+
=head3 Rights to Set Owner
The current user can set or change the Owner field in the following
@@ -2079,10 +2082,6 @@ Owner lock held by another user (see below) and can be a convenient
right for managers or administrators who need to assign tickets
without necessarily owning them.
-However, if you are checking if current user can "Take" or "Steal"
-the ticket, it will also check the ticket's current owner to determine
-if "Take" or "Steal" action could be operated.
-
=item *
ModifyTicket grants the right to set the owner to any user who
@@ -2123,11 +2122,22 @@ in the GUI.
This method accepts the following parameters as a paramshash:
-NewOwnerObj: Optional. A user object representing the proposed
-new owner of the ticket.
+=over
+
+=item C<NewOwnerObj>
-Type: Optional. The type of set owner operation. Valid values are Take,
-Steal, or Force.
+Optional; an L<RT::User> object representing the proposed new owner of
+the ticket.
+
+=item C<Type>
+
+Optional; the type of set owner operation. Valid values are C<Take>,
+C<Steal>, or C<Force>. Note that if the type is C<Take>, this method
+will return false if the current user is already the owner; similarly,
+it will return false for C<Steal> if the ticket has no owner or the
+owner is the current user.
+
+=back
As noted above, there are exceptions to the standard ticket-based rights
described here. The Force option allows for these and is used
-----------------------------------------------------------------------
More information about the rt-commit
mailing list