Need to disable "Publish" option under sharing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 11:42 AM
Hi All,
I need to disable/hide "Publish" option under sharing of report. It is OOB feature but as per my requirement I want to disable/hide this. Kindly help. PFB the screenshot
Regards,
Nandan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 12:52 PM
Just remove the 'report_publisher' role then. That's all you can do with this. Grant 'report_publisher' (with itil), 'report_admin', or 'admin'. If the user has any combination of those roles they will see the 'Publish' option. If they don't, the option will be removed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 02:37 PM
As this publish option provide direct link to the report so there is chance to security breach of data so I want to delete/disable this option for all.
There is no role constraint, I want to disable/delete it for all(even if possible to admin also).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 02:47 PM
You cannot remove that option from that page. The only thing you could do would be to create a business rule on the sys_report table that checks to see if the 'roles' field contains the 'public' role and then abort the update. That would prevent anything from ever being made public, but it won't remove the option from the front-end page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2018 11:38 AM
Thanks for your support.
Can you please help me to write the correct business rule as I am unable to achieve it by myself.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2018 12:38 PM
Here's how you can prevent any report from being published. You'll still see the 'Publish' link but this will prevent it from being saved. A report is published any time it is saved with the 'public' role. You can see the 'roles' field by navigating to the report table to verify. The front-end UI will make it look like the report can be published...and has been published...but it won't actually save on the back-end. It's not great, but it's the best you can do.
1) Navigate to 'Reports -> Administration -> All' in your left nav.
2) Right-click the list header and select 'Configure -> Business rules'
3) Create a new business rule with the following settings...
Name: Disallow publishing
Advanced: True
When: Before
Order: 1000 - This is important in order to abort correctly!
Insert/Update: True
Condition: current.roles.changes()
Script:
(function executeRule(current, previous /*null when async*/) {
var roles = current.roles.getDisplayValue();
if (roles !== null) {
// Check for the 'public' role
var n = roles.indexOf('public');
if (roles.indexOf('public') > -1) {
// If we find it abort the update
gs.addErrorMessage("Cannot save as a public report. Please remove the 'public' role and try again.");
current.setAbortAction(true);
}
}
})(current, previous);
Please mark my answer correct if I've answered your question.