Finer grained permissions on field level in blueprints
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.
@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?
Possible permissions as @jelleroorda suggested could be 'read', 'edit' and 'visible'.
Thanks!
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.