Pending User Requests

Bill Bonnett
Kilo Expert

How can I make it so non-admins can approve user access requests? I want a specific group to only approve pending users without having to admins to do it. Any suggestions?

1 ACCEPTED SOLUTION

marcguy
ServiceNow Employee
ServiceNow Employee

oh ok I just took a look at it, it's a new table and has no workflow so all you have to do really is modify the 2 UI Actions called 'Create User' and 'Reject'.



current condition is this:


current.state == "pending" && (gs.hasRole("admin") || gs.hasRole("user_admin"))



so user_admins also have the rights to do this but if you want another role of as you said a group do this:


current.state == "pending" && gs.isMemberOf('sys_id of your group in there');



Also you might need to check the ACLs on that user_registration_request to ensure those users can read/write to that table.



Alternatively you could just give that group the user_admin role and that's a much easier fix then?


View solution in original post

5 REPLIES 5

marcguy
ServiceNow Employee
ServiceNow Employee

Is this a catalog item? if so you can build a workflow for that item and select that group in the group approval activity.



Service Catalog Workflows - ServiceNow Wiki


It's a built-in plugin - self-registration and I can only see where one must be an admin to approve the user's request.


marcguy
ServiceNow Employee
ServiceNow Employee

oh ok I just took a look at it, it's a new table and has no workflow so all you have to do really is modify the 2 UI Actions called 'Create User' and 'Reject'.



current condition is this:


current.state == "pending" && (gs.hasRole("admin") || gs.hasRole("user_admin"))



so user_admins also have the rights to do this but if you want another role of as you said a group do this:


current.state == "pending" && gs.isMemberOf('sys_id of your group in there');



Also you might need to check the ACLs on that user_registration_request to ensure those users can read/write to that table.



Alternatively you could just give that group the user_admin role and that's a much easier fix then?


*SIGH* I didn't see "user_admin" so I thought "admin" which they are not. Thanks! Adding that role to those individuals did the trick! Thanks!