use RT::ACE;
my $ace = RT::ACE->new($CurrentUser);
# Queue rights are the sort of queue rights that can only be granted # to real people or groups
Load an ACE by specifying a paramhash with the following fields:
PrincipalId => undef,
PrincipalType => undef,
RightName => undef,
And either:
Object => undef,
OR
ObjectType => undef,
ObjectId => undef
PARAMS is a parameter hash with the following elements:
PrincipalId => The id of an RT::Principal object
PrincipalType => "User" "Group" or any Role type
RightName => the name of a right. in any case
Either:
Object => An object to create rights for. ususally, an RT::Queue or RT::Group
This should always be a DBIx::SearchBuilder::Record subclass
OR
ObjectType => the type of the object in question (ref ($object))
ObjectId => the id of the object in question $object->Id
Returns a tuple of (STATUS, MESSAGE); If the call succeeded, STATUS is true. Otherwise it's false.
Delete this object. This method should ONLY ever be called from RT::User or RT::Group (or from itself) If this is being called from within a transaction, specify a true value for the parameter InsideTransaction. Really, DBIx::SearchBuilder should use and/or fake subtransactions
This routine will also recurse and delete any delegations of this right
Grant a right with no error checking and no ACL. this is _only_ for installation. If you use this routine without the author's explicit written approval, he will hunt you down and make you spend eternity translating mozilla's code into FORTRAN or intercal.
If you think you need this routine, you've mistaken.
Takes a queue or system right name in any case and returns it in the correct case. If it's not found, will return undef.
If the object this ACE applies to is a queue, returns the queue object. If the object this ACE applies to is a group, returns the group object. If it's the system object, returns undef.
If the user has no rights, returns undef.
Returns the RT::Principal object for this ACE.
Takes a principal id and a principal type.
If the principal is a user, resolves it to the proper acl equivalence group. Returns a tuple of (RT::Principal, PrincipalType) for the principal we really want to work with
Returns the current value of id. (In the database, id is stored as int(11).)
Returns the current value of PrincipalType. (In the database, PrincipalType is stored as varchar(25).)
Set PrincipalType to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, PrincipalType will be stored as a varchar(25).)
Returns the current value of PrincipalId. (In the database, PrincipalId is stored as int(11).)
Set PrincipalId to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, PrincipalId will be stored as a int(11).)
Returns the current value of RightName. (In the database, RightName is stored as varchar(25).)
Set RightName to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, RightName will be stored as a varchar(25).)
Returns the current value of ObjectType. (In the database, ObjectType is stored as varchar(25).)
Set ObjectType to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, ObjectType will be stored as a varchar(25).)
Returns the current value of ObjectId. (In the database, ObjectId is stored as int(11).)
Set ObjectId to VALUE. Returns (1, 'Status message') on success and (0, 'Error Message') on failure. (In the database, ObjectId will be stored as a int(11).)
Returns the current value of Creator. (In the database, Creator is stored as int(11).)
Returns the current value of Created. (In the database, Created is stored as datetime.)
Returns the current value of LastUpdatedBy. (In the database, LastUpdatedBy is stored as int(11).)
Returns the current value of LastUpdated. (In the database, LastUpdated is stored as datetime.)
← Back to index