Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Reinier Kops 3 posts 23 karma points
    Oct 27, 2009 @ 08:52
    Reinier Kops
    0

    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?

  • skiltz 501 posts 701 karma points
    Oct 27, 2009 @ 10:01
    skiltz
    0

    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

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 27, 2009 @ 10:45
    Dirk De Grave
    1

    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

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Oct 27, 2009 @ 12:06
    Richard Soeteman
    1

    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 

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Oct 27, 2009 @ 12:39
    Dirk De Grave
    0

    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

  • Richard Soeteman 4054 posts 12927 karma points MVP 2x
    Oct 27, 2009 @ 12:50
    Richard Soeteman
    0

    +1 here. Didn't say it was a great solution, only that it's possible do it this way.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies