Kernel::GenericInterface::Operation::Ticket::TicketACL

NAME

Kernel::GenericInterface::Operation::Ticket::TicketACL – GenericInterface Ticket TicketACL Operation backend

PUBLIC INTERFACE

Run()

Perform TicketACL Operation. This function is able to reduce certain options from a particular ticket property by using existing ACL and ACL modules.

Restricts the inner Data parameter sent to a subset of it, depending on a group of user defied rules called ACLs.

This operation only handles ACLs that operates directly over ticker properties Each ACL can contain different restrictions for different objects the ReturnType parameter defines which object is considered for this restrictions, in the case of the Ticket object a second parameter called ReturnSubtype is needed, to specify the ticket attribute to be restricted, like: Queue, State, Owner, etc. While for the rest of the objects a "-" value must be set. The ReturnType and ReturnSubType must be set according to the Data parameter sent.

The rest of the attributes define the matching options for the ACL rules.

    my $Result          = $OperationObject->Run(
        Data => {
            UserLogin         => 'some agent login',      # UserLogin or CustomerUserLogin or AccessToken is
                                                          #   required
            CustomerUserLogin => 'some customer login',
            AccessToken       => 123,
            Password          => 'some password',         # If UserLogin or CustomerUserLogin are sent then
                                                          #    Password is required

            TicketID     => 123,                          # TicketID or TicketNumber are required
            TicketNumber => 2323443,
            Data => [                                     # Values to restrict
                {
                    Key   => 1,
                    Value => 'Value1',
                },
                {
                    Key   => 2,
                    Value => 'Value2',
                }
                {
                    Key   => 3
                    Value => 'Value3'
                }
                # ...
            ],

            or

            Data => {                                     # Data can also be HASH
                Key   => 1,
                Value => 'Value1',
            },

            ReturnSubType => 'SomeProperty',              # To match Possible, PossibleAdd or
                                                          #   PossibleNot sub-key in ACL

            ACLUserID         => 123,                     # Optional, used to override the UserID from
                                                          #   UserLogin, UserID => 1 is not affected by this
                                                          #   function
            ACLUserLogin      => 'SomeLogin'              # Optional, ACLUserID or ACLUserLogin can be used to
                                                          #     override UserID

            Action   => 'AgentTicketZoom',                # Optional
            Endpoint => 'ExternalFrontend::TicketCreate', # Optional
        },
    );

    $Result = {
        Success         => 1,                       # 0 or 1
        ErrorMessage    => '',                      # in case of error
        Data            => {                        # result data payload after Operation
            FilteredData => [
                {
                    Key   => 1
                    Value => 'Value1',
                },
                {
                    Key   => 3
                    Value => 'Value3',
                },
            ],
        },
    };
Scroll to Top