Script restriction
Important
- All scripts in Sitecore Content Hub™ are restricted, with permitted libraries and blocked libraries.
- If you have legacy unrestricted scripts that are published, and you upgrade to a later version than 3.2.2, your scripts will still work. However, you will not be able to create or publish new unrestricted scripts.
- If you have legacy unrestricted scripts, we recommend to convert them to restricted scripts.
Note
The ScriptConfiguration setting is system-owned; superusers cannot edit it.
Permitted libraries
You can use the following libraries in a script:
System.*
Stylelabs.M.Sdk.**
System.Net.HttpStatusCode
Stylelabs.M.Scripting.Types.**
Stylelabs.M.Framework.LoadConfigurations.**
Stylelabs.M.Framework.LoadOptions.**
Stylelabs.M.Base.Querying.Linq.**
Stylelabs.M.Base.Querying.Filters.**
Stylelabs.M.Base.Querying.Query
Stylelabs.M.Base.Querying.ScrollRequest
Stylelabs.M.Base.Querying.Sorting
Newtonsoft.**
Note
- One wildcard (
*
) means you can use only the classes and objects of that namespace. You cannot use the classes and objects of the embedded namespaces. For example,System.*
allows you to useSystem.ArgumentException
, but notSystem.Web.Services.WebService
(the first is directly within theSystem
namespace, unlike the second). - Two wildcards (``)** mean you can use any classes and objects of that namespace or any embedded namespaces.
Blocked libraries
You cannot use the following libraries:
System.Activator
System.Environment
System.GC
Blocked attributes
You cannot use the following attributes:
System.Type:InvokeMember
Can we improve this article ? Provide feedback