How to find all the users who has fulfiller access using client script ?

ragz
Tera Expert

Hi 

How to find all the users who has fulfiller access using Glide scripting?

 

var arrUsers = [];
    gs.log('1step');
    //Need to lookup user id later
    var usr = new GlideRecord('sys_user');
    
    //Need to get sys_id of the group
    var grpSysId = cmGetSysID('ITIL Users','sys_user_group');
      
    //Need to look up the Group Members
    gr = new GlideRecord('sys_user_grmember');
    gr.addQuery('group',grpSysId);
    gr.query();
    while (gr.next()){
        usr.initialize(); //Utilise the 'sys_user' table
        usr.addQuery('sys_id',gr.user);
        usr.query();
        while (usr.next()) {
        
            arrUsers.push(usr.user_name + "");

}

2 REPLIES 2

Aman Kumar S
Kilo Patron

What are you trying to achieve is not clear

Best Regards
Aman Kumar

Tony Chatfield1
Kilo Patron

Hi, can you clarify the meaning of 'fulfiller access using Glide scripting'?
Users would not normally have direct access to scripts, but scripts run as a result of user access.

Perhaps a better starting point would be to check table 'sys_user_has_role' and identify the users who have been assigned roles necessary to deliver fulfiller functionality - normally itil role