I think Ismail has done some hacking to show/hide some properties, not sure if he posted that in the old or new forum. A search may reveal some pointers.
An event handler to cancel the save could be a solution, altho would be annoying to editors with non admin rights (i would be annoyed)
An event handler is simple to implement, but if you want a more user friendly solution I would look at building a custom data type for this. This article from Tim descibes how to build one using the usercontrolwrapper. Basically you have to buidd a usercontrol with a checkbox that is only visible for admins so only admins can change the value.
It's a viable solution, certainly (ie custom data type for a single property), but would be quite some overhead IMO; what if there's some extra properties to 'protect' (creating extra custom datatypes, different permission levels/user type, different permission levels/doctype).
I'd opt for a general solution where permission can be set on doc type level, specifying what users (user types) may do inserts/updates of data. Anyone else having a similar requirement. If enough interest than a work item could be created on Codeplex?
How to disable some properties or tabs for non admins
I have create some documenttypes with some properties. One of these properties gives the possibility to show the newsitem on the frontpage.
I want that only admins can set this property to true or false.
How is this possible?
I'm not sure how you could hide a tab or hide a property but you could create an event handler which checks if the user is an admin and then takes appropaite measures. Check out Richards post on events at http://www.richardsoeteman.net/PermaLink,guid,f470b6cf-40da-4aa9-a0d9-7b984fe9bf59.aspx
I think Ismail has done some hacking to show/hide some properties, not sure if he posted that in the old or new forum. A search may reveal some pointers.
An event handler to cancel the save could be a solution, altho would be annoying to editors with non admin rights (i would be annoyed)
Cheers,
/Dirk
Reinier,
An event handler is simple to implement, but if you want a more user friendly solution I would look at building a custom data type for this. This article from Tim descibes how to build one using the usercontrolwrapper. Basically you have to buidd a usercontrol with a checkbox that is only visible for admins so only admins can change the value.
Cheers,
Richard
It's a viable solution, certainly (ie custom data type for a single property), but would be quite some overhead IMO; what if there's some extra properties to 'protect' (creating extra custom datatypes, different permission levels/user type, different permission levels/doctype).
I'd opt for a general solution where permission can be set on doc type level, specifying what users (user types) may do inserts/updates of data. Anyone else having a similar requirement. If enough interest than a work item could be created on Codeplex?
Cheers,
/Dirk
+1 here. Didn't say it was a great solution, only that it's possible do it this way.
is working on a reply...