On a current project we have a few properties which exist on some content types which should be visible to all but editable only by members of certain user roles.
We could implement something to handle and cancel the save event but that's a bit late in the game and frustrating for the user. Ideally we would just want to render the property as read only in the UI for users without the required roles.
Has anyone implemented anything like this?
I'm not sure if this is what you want however, as this will hide it from unauthorised users, not just make it readonly
p
ProNotion
06/04/2024, 8:43 AM
I'm just taking a look at it now as even if it is not an exact fit I am sure it will provide some inspiration to roll my own if needed and if I think it worthwhile more generally can try and submit a pull request back to the project for consideration.
ProNotion
06/04/2024, 10:06 AM
@Lotte Looks pretty close to what I need. I created a checkbox list property and tried it but the value is not getting saved so just digging into why that might be.
l
Lotte
06/04/2024, 11:08 AM
Oh well that's disappointing. If you clone the source repo it has test sites in. I can't remember if there's a checkbox in the test content...