Library ECB shows “Change New Button Order” for all users
-
09-12-2019 - |
Question
We have a document library which has content type management enabled. The library allows two content types, one based on Document, the other on Document Set.
We also have a custom action attached to the ECB that starts a workflow to set specific permissions on the item. Our custom action respects user permissions properly and does not show to user who should not see it.
Our problem is that the ECB now shows "Change New Button Order" for Document Set items to all users, no matter what their permission level. This is not a custom action - it is added by SharePoint automatically when you enable content type management on a library which accepts folders - or document sets, which inherit from folders. Only users with Manage List permissions on this library should see the "Change New Button Order" action, but SharePoint is showing it to everyone.
We don't want read-only users to be able to do this; we don't even want Contributor users to be able to do it.
How do I make it so that only Manage List permission levels can see this item in the ECB?
Solution
If you have custom action for ECB then you can specify the Rights
attribute to ManageLists
For e.g.
<CustomAction
Id="Ribbon.Blah.ReplacementButton"
Location="EditControlBlock"
Rights ="ManageLists"
RegistrationId="0x01AB"
RegistrationType="ContentType">
//some other stuff
</CustomAction>
You can also try other permission level if you want: http://techwirenews.com/setting-rights-for-custom-actions-using-sharepoint-designer-2010-in-sharepoint-online-office-365/