How do you prevent a User from Approving Own Request (i.e requested_for = Approver)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2012 04:14 PM
How do you prevent a User from Approving Own Request (i.e. requested_for = Approver).
- Labels:
-
Orchestration (ITOM)
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2012 04:19 PM
Manager Creates a Request with requested_for = User that is later configured as a Delegate for the Manager. This would allow the User who is now a Delegate of the Manager the ability to Approve a Request that is requested_for the Delegate User.
Approver should not be allowed to Approve Request for Self.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2012 07:06 PM
Good Simple Solution that also takes care of restricting Approvals that are initated via an Inbound Mail Action for Reject and Approve.
The Condition on the Business Rule was Not Working. The method you were using to obtain the sys_class_name was returning 'undefined'. Had to make the following change to the Business Rule Condition to get it to work properly.
current.state.changes() && current.sysapproval.sys_class_name == "sc_request" && gs.getUserID() == current.sysapproval.requested_for
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2012 04:25 PM
Perhaps a short "before update" Business Rule on the Approval (sysapproval_approver) table. If the state of the approval changes, and the approval is for a Request, and the current user is the requested_for individual, abort the update.
Condition:
current.state.changes() && current.sysapproval.getRecordClassName() == "sc_request" && gs.getUserID() == current.sysapproval.requested_for
Script:
current.setAbortAction(true);
gs.addErrorMessage("Nice try - sorry, Charlie");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 04:56 PM
after submitting BR state is approved