How to disable the agents to view others'tickets

Moderator: crythias

Post Reply
markit
Znuny newbie
Posts: 2
Joined: 17 Aug 2012, 05:07
Znuny Version: 3.1.0

How to disable the agents to view others'tickets

Post by markit »

As the topic, I would like each agent cannot see tickets which have been locked by other agents.
If a ticket is not locked, every agent can read it, once it is locked, only the owner and administrator can read it.
Is it possible in OTRS?
I have been searched around in tickets settings but can find nothing.
Thanks.
artjoms15
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: How to disable the agents to view others'tickets

Post by artjoms15 »

Have been stumbling upon this and here is the idea - it is impossible with a default setting of OTRS.
TicketSearch() function will allow to find the needed ticket no matter what permissions to what queues you have :(

What I suggest is to tweak Ticket.pm module, which is used to grant permissions to every Ticket object (Like for a ticket in AgentTicketZoom.pm)

Code: Select all

 
# check permissions
    my $Access = $Self->{TicketObject}->TicketPermission(
        Type     => 'ro',
        TicketID => $Self->{TicketID},
        UserID   => $Self->{UserID}
    );
And in this function add some criteria, like:

Code: Select all

/perl pseudocode Ticket.pm ~line 3291/
if($Ticket->{isLocked} && $Ticket->{Owner} ne $Self->{UserID}){
    return;
}
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
markit
Znuny newbie
Posts: 2
Joined: 17 Aug 2012, 05:07
Znuny Version: 3.1.0

Re: How to disable the agents to view others'tickets

Post by markit »

Great thanks!
I am new in both perl programming and OTRS, I will have a try on this.
artjoms15
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: How to disable the agents to view others'tickets

Post by artjoms15 »

A small hint - use Ticket object Plus methods TicketOwnerGet() and TicketLockGet() to get required info
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
Post Reply