ACL Configuration - VIP Users

Moderator: crythias

Post Reply
mferreira
Znuny newbie
Posts: 1
Joined: 29 Apr 2010, 20:37
Znuny Version: 2.4.7

ACL Configuration - VIP Users

Post by mferreira »

hi Peaple!!

I´m new here and i need help to customize a instalation of otrs 2.4.7 with ACL to set a high priority to a group of costumer users when some agent create a ticket.
Below i´m showing the code that i created to this:

# ticket acl
$Self->{TicketAcl}->{'ACL-Name-1'} = {
# match properties
Properties => {
# current action match properties
Frontend => {
Action => ['AgentTicketPhone', 'AgentTicketEmail'],
},
# current user match properties
CustomerUser => {
Group_rw => [
'VIP',
],
},
# return possible options (white list)
Possible => {
# possible ticket options (white list)
Ticket => {
Queue => ['some queue'],
State => => ['some state'],
Priority => ['5 very high'],
},
# possible action options (white list)
Action => {
AgentTicketLock => 1,
AgentTicketZoom => 1,
AgentTicketClose => 1,
AgentTicketPending => 1,
AgentTicketNote => 1,
AgentTicketHistory => 1,
AgentTicketPriority => 1,
AgentTicketFreeText => 0,
AgentTicketHistory => 1,
AgentTicketCompose => 1,
AgentTicketBounce => 1,
AgentTicketTicketPrint => 1,
AgentTicketForward => 1,
AgentTicketTicketLink => 1,
AgentTicketPrint => 1,
AgentTicketPhone => 1,
AgentTicketCustomer => 1,
AgentTicketOwner => 1,
},
},
# remove options (black list)
PossibleNot => {
Ticket => {
Priority => ['1 very low','2 low','3 normal','4 high'],
},
},
},
};

ok, after i inserted the code in config .pm when I click in the option agentcreatephone or agentcreateemail i receive a message like this:

Not an ARRAY reference at ../..//Kernel/System/Ticket.pm line 6971.

Verifying this part of ticket.pm i found this part of code:

# set match params
my $Match = 1;
my $Match3 = 0;
my $UseNewParams = 0;
for my $Key ( keys %{ $Step{Properties} } ) {
for my $Data ( keys %{ $Step{Properties}->{$Key} } ) {
my $Match2 = 0;
for my $Item ( @{ $Step{Properties}->{$Key}->{$Data} } ) {
if ( ref $Checks{$Key}->{$Data} eq 'ARRAY') {
my $Match4 = 0;
for my $Array ( @{ $Checks{$Key}->{$Data} } ) {

# eq match
if ( $Item eq $Array ) {
$Match4 = 1;
}

# regexp match case-sensitive
elsif ( substr( $Item, 0, 8 ) eq '[RegExp]' ) {
my $RegExp = substr $Item, 8;
if ( $Array =~ /$RegExp/ ) {
$Match4 = 1;
}
}

# regexp match case-insensitive
elsif ( substr( $Item, 0, 8 ) eq '[regexp]' ) {
my $RegExp = substr $Item, 8;
if ( $Array =~ /$RegExp/i ) {
$Match4 = 1;
}
}
if ($Match4) {
$Match2 = 1;

# debug log
if ( $Self->{Debug} > 4 ) {
$Self->{LogObject}->Log(
Priority => 'debug',
Message =>
"Workflow '$Acl/$Key/$Data' MatchedARRAY ($Item eq $Array)",
);
}
}
}
}

what is happening here, where did some wrong thing.
thanks a lot!! and Excuses for my terrible english.
Post Reply