[SOLVED] State-Type for ACLs OTRS 3.0

Moderator: crythias

Locked
rafaqf
Znuny newbie
Posts: 80
Joined: 30 Mar 2011, 11:10
Znuny Version: 3

[SOLVED] State-Type for ACLs OTRS 3.0

Post by rafaqf »

Hi all,

I'm tyring to keep Agents off to modify the state of a ticket when the tickets have some custom states. For that, I created a new State-Type by inserting it in the DB. The new State Type is called 'transmited'.

My question comes when I try it, and of course, it doesn't work. I've realized that in ACLs, you can use the Ticket Type (not states) like that:

Code: Select all

Properties => {
            Type => {
                Name => ['Ticket-Type1', Ticket-Type2'],
            },
        },
and my question is, is it possible to use the State Type to create an ACL like that?

Code: Select all

Properties => {	
        	Ticket => {
                	Type => ['transmited'],
        	},
or it assumes that what I'm calling is the Ticket Type instead of the State Type? Note that the syntax is not the same and no error is showed in the console after running the RebuildConfig.pm if I use the supossed State Type.

Thanks a lot!
Last edited by rafaqf on 27 Jul 2012, 10:21, edited 1 time in total.
OTRS 3.0.11 and KIX4OTRS on Linux
rafaqf
Znuny newbie
Posts: 80
Joined: 30 Mar 2011, 11:10
Znuny Version: 3

Re: State-Type for ACLs

Post by rafaqf »

Maybe because the new state type has been inserted into DB and is not a default type state from OTRS, it is not recognized?
OTRS 3.0.11 and KIX4OTRS on Linux
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: State-Type for ACLs

Post by crythias »

http://doc.otrs.org/3.1/en/html/ch18s03.html
Maybe because you're not asking for the state type at all.

Code: Select all

 State = {
            ID       => ['some id'],
            Name     => ['some name'],
            TypeName => ['some state type name'],
            TypeID   => ['some state type id'],
        },
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rafaqf
Znuny newbie
Posts: 80
Joined: 30 Mar 2011, 11:10
Znuny Version: 3

Re: State-Type for ACLs

Post by rafaqf »

[quote="crythias"]http://doc.otrs.org/3.1/en/html/ch18s03.html
Maybe because you're not asking for the state type at all.

But that works also in OTRS 3.0.11?

Thanks for your answer.
OTRS 3.0.11 and KIX4OTRS on Linux
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: State-Type for ACLs

Post by crythias »

Why do I have to read the documentation for you? I gave you an answer and link to documentation. Please don't ask me if it works without trying it yourself.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rafaqf
Znuny newbie
Posts: 80
Joined: 30 Mar 2011, 11:10
Znuny Version: 3

Re: State-Type for ACLs

Post by rafaqf »

crythias wrote:Why do I have to read the documentation for you? I gave you an answer and link to documentation. Please don't ask me if it works without trying it yourself.
And what makes you think I have not tried it before asking you again??

I tried it and looked for it, and didn't work. That's why I asked again. I don't ask to get fun or to bother YOU.

I saw that it is in 3.1 doc, but it's not in 3.0, "maybe works too", I thought, but it's not the case.

So after ALL THAT STEPS, I decide to ask you again. Maybe YOU should ask first if I've tested it instead of saying what YOU think we have done.
OTRS 3.0.11 and KIX4OTRS on Linux
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: State-Type for ACLs

Post by crythias »

OK, http://doc.otrs.org/3.0/en/html/acl.html doesn't say Type.
It does say:

Code: Select all

 Ticket => {
                State => ['new', 'open'],
So if you know the states that apply to the type, you can enter them there.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rafaqf
Znuny newbie
Posts: 80
Joined: 30 Mar 2011, 11:10
Znuny Version: 3

Re: State-Type for ACLs

Post by rafaqf »

[quote="crythias"]OK, http://doc.otrs.org/3.0/en/html/acl.html doesn't say Type.
It does say:

Code: Select all

 Ticket => {
                State => ['new', 'open'],
Why if I have my ACLs already written, with all the status of type open, and now I change them to new or closed, my ACL doesn't work? It should, because I'm not saying anything about the Status Type on the ACLs but just the status name, shouldn't it?
OTRS 3.0.11 and KIX4OTRS on Linux
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: State-Type for ACLs

Post by crythias »

rafaqf wrote:I'm tyring to keep Agents off to modify the state of a ticket when the tickets have some custom states.

Code: Select all

$Self->TicketAcle->['AgentsCannotModifyStateIf'] = {
    Properties => {
      Ticket => {
         State => ['transmittedstate1', 'transmittedstate2'],
      },
   Possible => {
      Ticket => {
         State => ['closed'],
      }
  }
Agents can't *generally* manually change states unless it's an option enabled for the action they're allowed to perform (Pending, etc.) But if the ticket is in "Transmitted", you may want to disable Possible => { Action => { ... } , }

But I don't really know what you want to accomplish. I can only guess, but this is likely for what you stated.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: State-Type for ACLs

Post by crythias »

rafaqf wrote:Why if I have my ACLs already written, with all the status of type open, and now I change them to new or closed, my ACL doesn't work?
Because your ACLs are written to match Property of State open. State is not state type. State Type is a categorization of states.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rafaqf
Znuny newbie
Posts: 80
Joined: 30 Mar 2011, 11:10
Znuny Version: 3

Re: State-Type for ACLs

Post by rafaqf »

crythias wrote:
rafaqf wrote:Why if I have my ACLs already written, with all the status of type open, and now I change them to new or closed, my ACL doesn't work?
Because your ACLs are written to match Property of State open. State is not state type. State Type is a categorization of states.
Finally I did a very long ACL to solve my problem. I was trying to do it with the state_type to have a simpler ACL, but as it doesn't work as I expected in OTRS 3.0.11, my solution was that.

Thank you very much.

Anyway, I'd like to know if that is supossed to work, because I couldn't achieve it like I wanted.

If I would want to use an ACL so that unless a ticket is not an state_type "open" ticket, agents from group Supervisor can't modify it, it would be like that? That's not working, and it's a pitty!

Code: Select all

$Self->{TicketAcl}->{'Mail-State8'} = {
        Properties => {
                Ticket => {
                        State => ['open'],
			},
		User => {
                        Group_rw => ['Supervisor Group'],
                },
        },
        Possible => {
                Ticket => {
                        State => [],
                },
        },
    };
Thanks again!
OTRS 3.0.11 and KIX4OTRS on Linux
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: State-Type for ACLs

Post by crythias »

Code: Select all

$Self->{TicketAcl}->{'Mail-State8'} = {
        Properties => {
                Ticket => {
                        State => ['open'],
         },
      User => {
                        Group_rw => ['Supervisor Group'],
                },
        },
        Possible => {
                Ticket => {
                        State => [],
                },
        },
    };
This says, "If the State is open and the User is in the Supervisor Group with rw permissions, there is no available state to select."
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rafaqf
Znuny newbie
Posts: 80
Joined: 30 Mar 2011, 11:10
Znuny Version: 3

Re: State-Type for ACLs

Post by rafaqf »

crythias wrote:This says, "If the State is open and the User is in the Supervisor Group with rw permissions, there is no available state to select."
Exactly.

The awesome thing would be, "if the state_type of the ticket is open and the User is in the Supervisor Group with rw permissions, there is no available state to select".
OTRS 3.0.11 and KIX4OTRS on Linux
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: State-Type for ACLs

Post by crythias »

Yeah, but if you don't have 1,000 states, it's not necessarily a big deal to

Code: Select all

$Self->{TicketAcl}->{'Mail-State8'} = {
        Properties => {
                Ticket => {
                        State => ['open1','open2','new','open','in process','ignored','awaiting the second coming','never going to fix'],
         },
      User => {
                        Group_rw => ['Supervisor Group'],
                },
        },
        Possible => {
                Ticket => {
                        State => [],
                },
        },
    };
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rafaqf
Znuny newbie
Posts: 80
Joined: 30 Mar 2011, 11:10
Znuny Version: 3

Re: State-Type for ACLs

Post by rafaqf »

Yes, exactly, so my solution is just like what you have written.

Thanks a lot!
OTRS 3.0.11 and KIX4OTRS on Linux
Locked