DESCRIPTION

METHODS

Rights

# Queue rights are the sort of queue rights that can only be granted # to real people or groups

LoadByValues PARAMHASH

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

Create <PARAMS>

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
   DelegatedBy => The Principal->Id of the user delegating the right
   DelegatedFrom => The id of the ACE which this new ACE is delegated from
    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

Delegate <PARAMS>

This routine delegates the current ACE to a principal specified by the PrincipalId parameter.

Returns an error if the current user doesn't have the right to be delegated or doesn't have the right to delegate rights.

Always returns a tuple of (ReturnValue, Message)

Delete { InsideTransaction => undef}

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

_BootstrapCreate

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.

CanonicalizeRightName <RIGHT>

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.

Object

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.

PrincipalObj

Returns the RT::Principal object for this ACE.

_CanonicalizePrincipal (PrincipalId, PrincipalType)

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