I have cloned a custom cockpit application with version: 1015.0.249
We have a two users Admin and Guest. We need to disable copy and paste dashboard option to the guest user, which has only a reader access or not having admin access.
can we disable the copy and paste dashboard option based on the roles ?
Error messages / full error message screenshot / log file:
There is sadly no unique identifier to specifically identify the Copy dashboard ActionBarItem… Using the filter from above could potentially remove also other items in the more menu of the action bar, which use the same priority. So you might want to double check that you are not removing further items.
The above sample removes the Copy dashboard item completely, but you should be able to adapt this in case you only want to do this under certain conditions.
Similar procedures should also apply for e.g. the left navigation, the tabs and probably also further extension points.