Make Sitecore Field Read-Only

In this blog, I will discuss with you How to make Sitecore Item Field Read-Only.

Scenarios: I have fetched the data from an external Database and create Sitecore items into the content tree and update the field values of items in the Sitecore content tree. There are Sitecore jobs that will run periodically and perform the above operations, but content editors can update those data and we can lose the actual values.

Solution: As you are aware that access rights are applied on Sitecore Items so to resolve the above issue, I made the Sitecore item fields Read-only. Find below the steps to make the Sitecore Items field read-only:

  1. Go to the respective items template and find the field which you want to make read-only. Here I am doing with the Title field: Sitecore Field Read-Only-1

  2. In the Ribbon Bar menu click on the View button and make sure that both Standard fields and Raw values checkbox are checked:

  3. Go to the security section in the right panel and insert the below text into that security[shared] field and save the item.
    ar|sitecore\Everyone|pe|-field:write|


    If you don't want to permit the user to provide access rights on both Read and Write, then you can update your security field text as below:
    ar|sitecore\Everyone|pe|-field:write|-field:read|

It will make the selected field read-only for all the Sitecore users except the administrators. For more security access rights you can take reference from here.

Now the question is what the meaning of the "ar" and "pe" Sitecore command? Find below the meaning of the access right command:

  • ar – Permission applies to a role
  • au – Permission applies to a user
  • pe – Item-level permissions
  • pd – Descendant-level permissions

Option 2: You can also do the same configuration on Sitecore Items by Security Editor window as below:


For more details about the security editor window, you can refer to it here.

Happy Sitecoreing ðŸ˜Š

Comments

Post a Comment

Popular posts from this blog

Sitecore Installation Error: Failed to Start Service 'Sitecore Marketing Automation Engine'

Import CSV Data in Sitecore Using PowerShell: Part-3

Sitecore Technology MVP Journey 2022