Corey Burnett
Corey Burnett

Reputation: 7340

How to restrict Field Write access in Sitecore by roles

Let's say I have a data template that has 3 field sections: Basic Info, Navigation Info and Content Info. I would like to restrict Field Write access to the fields in these sections by role. I know that it is fairly simple to create a role for each of these and deny Field Write for the other sections. For example, I could create a role called Basic Info Editor Role and deny Field Write for all of the fields in the Navigation Info and Content Info sections. However I need to have the ability for a given user to be a member of more than one role sometimes. So I may have a user called jSmith that is a member of both the Basic Info Editor Role and also the Navigation Info Editor Role. I want jSmith to be able to edit both of those sections of content.

I can't figure out how to do this. It seems that by default all users have Field Write access to all templates. I think somehow I need to remove inheritance so that they don't all have the Field Write granted or something. Any ideas?

Upvotes: 2

Views: 1216

Answers (1)

Marek Musielak
Marek Musielak

Reputation: 27132

From what I remember you cannot assign Field Read and Field Write access rights on the section level - you can only do this on the field items directly.

Anyway, I think your approach is correct:

  • select chosen field which should be restricted
  • break the inheritance of this field for your base role (e.g. Standard Editor)
  • and then create Basic Info Editor Role which will be a member of the Standard Editor role
  • add Field Write option for the selected field for Basic Info Editor Role role.

All other Standard Editors won't be able to change this field, only Basic Info Editors will be allowed to change it.

Upvotes: 1

Related Questions