NoScript (DenyAddAndCustomizePages) support in modern sites

Copper Contributor


I was just wanting some confirmation on support for disabling NoScript (DenyAddAndCustomizePages) with modern sites. It does work but want to confirm it's supported to do this and won't suddenly get disabled. The reason I want to do it is to implement a solution that adds a Custom Action to a document library.


There seems to be conflicting information in the same set of MSDN articles.

This page above talsk about NoScript and says you CAN'T disable it:
"The impact of noscript is the same for "modern" or "classic" sites, the only difference with "modern" sites is that you cannot turn off "noscript" whereas this is possible for "classic" sites."

The page above talks about NoScript and says you CAN disable it:
"You however can disable NoScript in "modern" sites to achieve the same behavior for "modern" list and libraries across "classic" and "modern" sites."

As I said it does seem to allow it at the moment. Any help clarifying which is correct would be great.



2 Replies

What should this Custom Action do and how should it appear? In the "ribbon" or ECB menu?


You can see the supported customizations for lists and libraries here without modifying NoScript tag.


Furthermore, there are some SPFx Extensions coming to modern team sites (currently in dev preview) that lets you create user custom actions on site collection level (and more), custom actions and JSLink equivalent in lists and libraries and other features as well.

Thanks for the info - looking forward to the extra developer options.  The action i'm adding is just a link to a seperate website and needs to appear in the document menu (EditControlBlock).


I have it working fine on modern sites but only if I disable NoScript. The page you suggested is the one I used to do this and it does have a note about NoScript so seems to confirm this. My confusion is that other pages within the same set of articles suggest changing NoScript is not possible on Modern sites as if it's not suported so was just looking for clarification on if I should be using it.


This is the comment from the list customisation page you posted: 


The above custom actions show up in "modern" lists and libraries only when you are in classic sites with "modern" UI enabled, while they by default don't show up in "modern" sites as it's not possible to add user custom actions to "modern" sites because they've the NoScript option enabled. You however can disable NoScript in "modern" sites to achieve the same behavior for "modern" list and libraries across "classic" and "modern" sites.