Rights in lifecycle

Hi all,

I’m trying to install a new lifecyle and I’m unable to make the rights
working.

I can see the rights I create on the web interface, but event I give the
rights to a users, this users cannot change the status of a ticket.

Event Epoch root cannot change it…

If I got to the search interface I can see those status I create.

Where I’m wrong ?

Regards.

Here the lifecycle (sorry it’s in french).

achats => {
# All the appropriate order statuses
initial => [ ‘en-discussion’ ],
active => [ ‘en-attente’,‘en-commande’, ‘approuver’ ],
inactive => [ ‘livrer’, ‘refuser’, ‘deleted’ ],

        # Default order statuses for certain actions
        defaults => {
            on_create => 'en-discussion',
        },

        # Status change restrictions
        transitions => {
            ''          => [qw(en-discussion)],
            en-discussion => [qw (en-attente deleted)],
            en-attente    => [qw(approuver refuser deleted)],
            approuver   => [qw(en-commande refuser deleted)],
            en-commande  => [qw(livrer)],
        },
        # Rights for different actions
        rights => {

            # These rights are in the default lifecycle
            '* -> deleted'  => 'DeleteTicket',

            # Maybe we want to create rights to keep QA rigid
            'en-attente -> *' => 'Approbationcommand',
            'en-discussion -> *' => 'onestdaccord',
            'approuver -> *' => 'Mettreencommand',
        },

        actions => [
            'en-discussion -> en-attente' => {
                    label  => 'On est en accord',
                    update => 'Comment',
            },
            'en-discussion -> deleted' => {
                    label  => 'Supprimer',
                    update => 'Comment',
            },
            'en-attente -> approuver' => {
                label  => 'Bon pour commande',
                update => 'Respond',
            },
            'en-attente -> refuser' => {
                label  => 'Commande refuser',
                update => 'Comment',
            },
            'en-attente -> deleted' => {
                label  => 'Supprimer',
            },
            'approuver -> en-commande' => {
                label  => 'En commande',
                update => 'Respond',
            },
            'approuver -> refuser' => {
                label  => 'Commande infructueuse',
                update => 'Comment',
            },
            'approuver -> deleted' => {
                label  => 'Commande impossible',
                update => 'Comment',
            },
            'en-commande -> livrer' => {
                label  => 'Commande livrer',
                update => 'Comment',
            },
        ],
    },

Albert SHIH
DIO b�timent 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
T�l�phone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: jas@obspm.fr
Heure local/Local time:
mar 19 mar 2013 19:19:03 CET

Le 19/03/2013 ? 19:26:52+0100, Albert Shih a �crit

Hi all,

I’m trying to install a new lifecyle and I’m unable to make the rights
working.

OK I find the problem.

            # Maybe we want to create rights to keep QA rigid
            'en-attente -> *' => 'Approbationcommand',
            'en-discussion -> *' => 'onestdaccord',
            'approuver -> *' => 'Mettreencommand',

it’s work only in the other direction :

* -> XXX

not

XXX -> *

Sorry.

Regards.

JAS
Albert SHIH
DIO b�timent 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
T�l�phone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: jas@obspm.fr
Heure local/Local time:
mar 19 mar 2013 19:46:39 CET

Le 19/03/2013 ? 19:26:52+0100, Albert Shih a écrit

Hi all,

I’m trying to install a new lifecyle and I’m unable to make the rights
working.

OK I find the problem.

            # Maybe we want to create rights to keep QA rigid
            'en-attente -> *' => 'Approbationcommand',
            'en-discussion -> *' => 'onestdaccord',
            'approuver -> *' => 'Mettreencommand',

it’s work only in the other direction :

* -> XXX

not

XXX -> *

It works either way and also you can use “XXX -> YYY” and “* -> *”.
These four allow you to completly override RT’s rights for status
changes.

‘* -> XXX’ is the most used pattern as it’s easier to understand and
name usually matches XXX or close to it.

‘* -> XXX’ has higher priority over ‘YYY -> *’, so if RT checks
whether user can do ‘YYY -> XXX’ status change then the former right
will be checked, not both, neither latter.

If this doesn’t work then I would love to see a bug report with more details.

Sorry.
Regards.

Best regards, Ruslan.

Le 19/03/2013 ? 22:59:39+0400, Ruslan Zakirov a �crit

Le 19/03/2013 ? 19:26:52+0100, Albert Shih a �crit

Hi all,

I’m trying to install a new lifecyle and I’m unable to make the rights
working.

OK I find the problem.

            # Maybe we want to create rights to keep QA rigid
            'en-attente -> *' => 'Approbationcommand',
            'en-discussion -> *' => 'onestdaccord',
            'approuver -> *' => 'Mettreencommand',

it’s work only in the other direction :

* -> XXX

not

XXX -> *

It works either way and also you can use “XXX → YYY” and “* → *”.
These four allow you to completly override RT’s rights for status
changes.

‘* → XXX’ is the most used pattern as it’s easier to understand and
name usually matches XXX or close to it.

‘* → XXX’ has higher priority over ‘YYY → *’, so if RT checks
whether user can do ‘YYY → XXX’ status change then the former right
will be checked, not both, neither latter.

If this doesn’t work then I would love to see a bug report with more details.

At this time I can’t test, the RT is in production.

But I can say (absolue sure) they’re a bug (or I misread the documentation)
about the name of the status.

It’s not working if the name contain �-�, so

en-attente

not working but

enattente

working.

When I say �not working� it’s about the right.

For example if I put in RT_SiteConfig something like

' * -> en-attente' => 'Approbationcommand',

give the rights ‘Approbationcommand’ to me in the web interface, I still
cannot put a ticket in that status.

But if I change en-attente to enattente it’s working.

Regards.

JAS

Sorry.
Regards.


Best regards, Ruslan.
Albert SHIH
DIO b�timent 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
T�l�phone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: jas@obspm.fr
Heure local/Local time:
mer 20 mar 2013 13:36:33 CET