ideas icon indicating copy to clipboard operation
ideas copied to clipboard

Finer grained permissions on field level in blueprints

Open jelleroorda opened this issue 5 years ago • 2 comments

Right now I have a few use cases where users of the site have to work together to publish content. So basically there is someone who will fill out the content, and then there’s someone who ā€œchecksā€ the content and updates a feedback field if the content needs improvements. Right now I have to create a custom EntriesController that basically does the same as the core EntriesController, but then adds/removes read_only: true from the specific fields. It would be rad if you could simply specify something along the lines of:

- handle: feedback
  type: textarea 
  policy: ā€˜my custom registered permission’

Which would be the simple case I described above, or maybe also allow an optional more fine grained control:

- handle: feedback
  type: textarea 
  policy:
    read: ā€˜my custom registered permission’
    edit: ā€˜another permission’

Other than it being a conditional read_only field (or not having it shown in the CP at all) it would of course filter out these fields on store/update.

jelleroorda avatar Dec 02 '20 19:12 jelleroorda

@edalzell @jasonvarga @jesseleite Hey guys! I have a client who asked for field level permissions. Would you be open for a PR for this one? I imagine to create a new tab in the Blueprint editor along 'Settings | Conditions | Validation' for 'Permissions'. What do you think?

Image

Possible permissions as @jelleroorda suggested could be 'read', 'edit' and 'visible'.

Thanks!

morhi avatar Mar 24 '25 10:03 morhi

Hey guys! I have a client who asked for field level permissions. Would you be open for a PR for this one? I imagine to create a new tab in the Blueprint editor along 'Settings | Conditions | Validation' for 'Permissions'. What do you think?

Sure but's it's quite a deep rabbit hole because you have to tie it to both to permissions and multi-site.

If/when you do make it, please add lots of tests.

edalzell avatar Mar 24 '25 22:03 edalzell