Sometimes we misuse properties voor setting and / or config. It would be nice if we can specify per property if a property will be visible or be hidden for a specific group(s).
We could present a list of available user groups here and what is the most elegant way to do this, check if you want it visible, of default visible, and uncheck if you want to hide the property?
Is this something that will fit inside Umbraco?
If yes, what is the preferred way of doing this?
If no, I will look for another solution.
Personally I would do this default visible and check it to unhide. The majority of properties will be visible to all users, so that is a lot of unchecking when creating doctypes.
I personally hide tabs from certain user groups. Where should the checkboxes for that go ?
From an API point of view this can be done now with events so it would be up to you at a granular level to decide what rules are applied to hide properties. You can subscribe to the event EditorModelEventManager.SendingContentModel and modify the outgoing model which means you can add/remove tabs/properties, and pretty much whatever you want. If you wanted to pursue that without modifying the core It would also be possible to create a package to have some UI to control these rules if you wanted.
I have created a first package version. You can create and manage rules (not delete yet). This monday I will continue and build options to delete rules and toggle active state. Also to export and import rules between environments.
Hide properties for specific user groups
Sometimes we misuse properties voor setting and / or config. It would be nice if we can specify per property if a property will be visible or be hidden for a specific group(s).
We could present a list of available user groups here and what is the most elegant way to do this, check if you want it visible, of default visible, and uncheck if you want to hide the property?
Is this something that will fit inside Umbraco? If yes, what is the preferred way of doing this? If no, I will look for another solution.
Jan.
Hi Jan,
Personally I would do this default visible and check it to unhide. The majority of properties will be visible to all users, so that is a lot of unchecking when creating doctypes.
I personally hide tabs from certain user groups. Where should the checkboxes for that go ?
Dave
From an API point of view this can be done now with events so it would be up to you at a granular level to decide what rules are applied to hide properties. You can subscribe to the event
EditorModelEventManager.SendingContentModel
and modify the outgoing model which means you can add/remove tabs/properties, and pretty much whatever you want. If you wanted to pursue that without modifying the core It would also be possible to create a package to have some UI to control these rules if you wanted.The question was more about the manager of the rules, not how to show / hide them. I already known
EditorModelEventManager.SendingContentModel
.Thank you! I will have a look for something to create and or mangere the rules.
HI Jan,
There is a package that I believe can be used to do this.
Have a look at https://our.umbraco.com/packages/collaboration/backoffice-tweaking/
Nik
Thank you Nik,
It is in the good direction, it seems that is is not working on later versions of Umbraco. I will use it as starting point.
I have created a first package version. You can create and manage rules (not delete yet). This monday I will continue and build options to delete rules and toggle active state. Also to export and import rules between environments.
https://www.myget.org/feed/janvanhelvoort/package/nuget/Our.Umbraco.HideProperties
Version 0.2.0 is ready: https://github.com/janvanhelvoort/Umbraco-hide-properties/releases/tag/0.2.0
This looks like a great package. Does it still work with Umbraco 7.13.x? This should be a standard feature in 8.
is working on a reply...