To prevent non-admin users from sharing a dashboard with more than 50 members in a single request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago - last edited 2 hours ago
Hello @tcsrakshash,
I haven’t come across this issue before, but this is what I’m thinking would work.
I think dashboard sharing usually uses the pa_dashboards_permissions table, so you could put a simple check there with a business rule.
Something like... if user is not admin -> count how many members they’re trying to share with → if over 50, abort it -> show a message.
You might need to consider if a user tries to add a group with more than 50 members as well. So, play around with it and see how it works with groups. That would probably look like creating a loop to count the members for each group and adding it to variable for a final count.
Also step back and consider if there is a better way to manage this using roles. You could setup a group to give the privilege to select trusted users.
I hope this helps!
Sr. ServiceNow Developer | Infosys