We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.
For more information around feature requests in the Cireson Community click here.
confusing RA approval by non-reviewers
Any end-user visiting approval URL (https://portal/ReviewActivity/Approval/RAID) sees active Approve/Reject buttons and can click them getting 'RA has been approved' notice but if he's not reviewer in given RA and he doesn't have permissions to approve/reject, nothing happens. The notice is very confusing.
Non-reviewer user comming to approval page should be informed somehow that he can't vote, e.g. non clickable greyed-out buttons or some notice 'you can't vote'.
Cireson support adviced me to create community feature request describing this situation.
Comments
Heavily inspired by @Nick_Flint's code, I've updated it a bit to check whether the user is a member of an AD group which is set as Reviewer:
@Konstantin_Slavin-Bo Nice! I like the tool tip with the explanation!
After updating to your code, I noticed that it breaks if the RA has a 'blank' reviewer (created by SCSM if the RA is created without a reviewer). Error: "Cannot read property UserName". Makes sense since there isn't a UserName in that case. I haven't tested it with both a named reviewer and a blank reviewer.
@Nick_Flint Ah yes, good catch, I didn't test that scenario. Thanks for the heads-up! Here's the updated code, which takes into account, if there's no actual reviewers on the RA (also updated to support legacy javascript, ie. Internet Explorer):
I also included the code we use to cleanup the approval page a bit, which removes anything related to the SR, the links and shows the full RA description. As we target the approval page to endusers, all that additional info is unnecessary. Simply set the cleanupPage variable on line 8 to true or false to enable/disable this. Example:
cleanupPage = false
cleanupPage = true
And now that we are in this FR thread, I just wanted to add, that the Approvals page should fail gracefully, when the object requested is not found. Right now, if you enter a non-existing RA or MA, it will simply hang on the "load" animation and throw an error in the console, that ClassName was undefined. This is because the object returned "does not exists or you do not have access to it". This should of course be handled and displayed properly to the user.