1

I would like to know if it is possible to hide the copy to/move to buttons from the "Edit" permission level in the show actions menu and the ribbon menu SharePoint Online - Communication site.

Hide Copy To/Move To

If it is possible could you please provide an example of how it can be done?

Any help will be highly appreciated.

Thank you in advance.

3 Answers 3

2

Here is a similar case for your reference:

1

Since "Edit" permission gives privilege to copy and move, I believe it's not possible to override that behavior.

Though it's not a standard approach, one option could be to inject css with extension and hide those elements.

FYI, below article says, if you uncheck "Prevent users from running custom script" Copy To/Move will not be visible(I haven't tried). But this might disrupt other features.

Sharepoint online move/copy to functions disappeared

You can use the git repo from below mentioned article. In that code, in oninit method, you need to add additional condition, to add css file only if current user is in required role\group.

How to Inject Custom CSS in Modern Sites

To get the current user details plz check here Get current user's user group in SPFx WebPart

2
  • Thank you for your response. I think the best option is to inject CSS and hide those elements based on a specific security role, is there any blog post showing how it can be done? Looking forward to your response.
    – SmithBZ
    Commented Aug 21, 2021 at 7:12
  • 1
    Please check updated answer for reference links. Commented Aug 22, 2021 at 15:19
0

You can easily set this to directly grant the user "View Only" permission, hence those two options will disappear, since those are "edit" options and users with view only does not have that.

1
  • The "View Only" permission will not allow the user to upload any file to the library and the requirement is to allow the user to upload any document without using Move to/Copy to features.
    – SmithBZ
    Commented Aug 28, 2021 at 11:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.