Hello!
Is it possible to compare ACL properties with system variables? For example to compare if the current user is the creator of a ticket. I mean somehow compare
CustomerUser => { UserCustomerID => [Ticket => CustomerUserID] I already created test variables like $user='xxx' and if I use that variable it works okey, so maybe anyone can tell me how to acquire current user ID or suggest a better idea then I imagined
Thank You in advance!
ACL match properties with variables
Moderator: crythias
-
- Znuny advanced
- Posts: 121
- Joined: 30 Aug 2011, 10:48
- Znuny Version: 3.3.8 && 4.0.9
- Real Name: Artjoms Petrovs
- Location: Latvia
ACL match properties with variables
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
-
- Znuny advanced
- Posts: 121
- Joined: 30 Aug 2011, 10:48
- Znuny Version: 3.3.8 && 4.0.9
- Real Name: Artjoms Petrovs
- Location: Latvia
Re: ACL match properties with variables
I think I solved this problem. It appeared only because of my programmer iliteracy
Solution:
Solution:
Code: Select all
$Self->{TicketAcl}->{'TESTUSERSSSSSSS'} = {
# match properties
Properties => {
Frontend => {
Action => ['CustomerTicketMessage'],
},
User => {
UserCustomerID => [$Env{"UserLogin"}],
},
},
Possible => {
Ticket => {
Type => ['Incident'],
},
},
};
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
Re: ACL match properties with variables
Hi,
I tried to create an ACL like the one above but it doesn't work.
I ask you if it is possible to pass and how to create an ACL that shows certain values of a field based on the customer user who logged in and is creating the ticket (I would like to pass in the acl the variable Env {"UserLogin"} from which I retrieve the 'logged in user).
Thanks in advance for availability
I tried to create an ACL like the one above but it doesn't work.
I ask you if it is possible to pass and how to create an ACL that shows certain values of a field based on the customer user who logged in and is creating the ticket (I would like to pass in the acl the variable Env {"UserLogin"} from which I retrieve the 'logged in user).
Thanks in advance for availability
-
- Administrator
- Posts: 3964
- Joined: 18 Dec 2007, 12:23
- Znuny Version: Znuny and Znuny LTS
- Real Name: Roy Kaldung
- Company: Znuny
- Contact:
Re: ACL match properties with variables
Hi,
You have to write your own ACL module, this is an example: https://github.com/OTRS/otrs/blob/rel-6 ... dChilds.pm
- Roy
You have to write your own ACL module, this is an example: https://github.com/OTRS/otrs/blob/rel-6 ... dChilds.pm
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
Use a test system - always.
Do you need professional services? Check out https://www.znuny.com/
Do you want to contribute or want to know where it goes ?
[SOLVED]Re: ACL match properties with variables
thanks for the support, I opted for a different path