i want to restrict the users to create and update p1 and p2 tickets

chinna
Mega Guru

Hi Team,

i have a requirement like, i want to restrict the users to create and update the p1 and p2 tickets.

only 2 groups people only able to create and update the tickets.

how can i achieve this. can anyone help me on this with a script.

may be acl is works for this.

 

regards,

chinna

9 REPLIES 9

Omkar Mone
Mega Sage

Hi 

You can just chose what to show to the users with query BR. 

 

Two groups that would be able to update the P1 and P2 would see them,rest who are not going to work wont see them in the list. Let me know what you think about this approach.

 

Regards,

Omkar Mone

i mean in the incident form if user wants to create and update a p1 and tickets i want to restict the people,  you dont have a access to create or update the incident.

for 2 groups only i need to provide a access. 

AbhishekGardade
Giga Sage

Hell Chinna

1. Create onLoad Client script and based on your condition hide options.

function onLoad() {

var loggeduser =g_user.userID;
var ga = new GlideAjax('priorityCheck'); // script include name
ga.addParam('sysparm_name', 'checkUserGroup'); // script include function name
ga.addParam('sysparm_user', loggeduser); // passing logged in user
ga.getXML(handleResponse);
}

function handleResponse(response) {

var userIsPartOfGroup = response.responseXML.documentElement.getAttribute('answer');

if(userIsPartOfGroup != 'yes'){

g_form.removeOption('impact','1');
g_form.removeOption('urgency','1');

}

}

 

2. Your Script iinclude Will check if logged in user is part of the group or not. based on answer returned to client script you can hide priority P1 So they are not able to select or change the priority.

let me know if you need a script include help

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

 

Thank you,
Abhishek Gardade

Hi abhishek,

 

i dont want to remove the options, i want to restrict the users for example if the user selects the proiority 1 we want to restrict to create the p1 tickets. if the user open p1 tickets, they dont want to update any field i want to restrict.

 

Regards,

chinna