More in this section

Forums / Developing with Sitefinity / Contacts/directory module

Contacts/directory module

4 posts, 0 answered
  1. William
    William avatar
    1 posts
    09 Sep 2008
    10 Sep 2008
    Link to this post
    I'm thinking of using Sitefinity for a large web development job, but I will need to develop a module similar to a 'contacts' or 'directory' module, however I will need to grant user edit permissions on each single 'contact' page rather than on the whole module. For example I only want 'Joe Bloggs' to be able to edit 'Joe Bloggs' contact details and not anyone else's (unless they had permission to do so, like a 'group' permission).
    Please could someone let me know if this is do-able, and if so, how much work would be involved in terms of time and knowledge.
    It would not need to be a pluggable module.

    Also is there a list of 'official' sample modules and where can I download them?

    Many thanks in advance!

  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    18 Jul 2012
    10 Sep 2008
    Link to this post
    I had to handle a somewhat similar situation. not with contacts but where a module needed per-user permissions. I took a simple approach and tied the item to be edited with the username of the person logged in. then I simply checked if the item being edited matched the Page.User.Identity.Name and if they are the same allow editing, otherwise deny.

    protected void ViewAgenda(object sender, CommandEventArgs e)  
        // make sure user can access this agenda  
        if (Page.User.Identity.Name != "admin" && e.CommandArgument.ToString() != Page.User.Identity.Name)  
                    // inform user of invalid permissions  
            this.messageText = string.Format("You do not have permissions to edit {0} agendas", e.CommandArgument.ToString());  
        // otherwise switch to edit mode  

    Just insert the username as a commandargument of the Edit Linkbutton on the grid (assuming you're using one).

    hope this was helpful!
  3. Pierre
    Pierre avatar
    433 posts
    16 Feb 2006
    10 Sep 2008
    Link to this post

    Could you try this link. I'm searching same solution : be able to edit only for authorized roles and the (username or some name stored) owner of article (using metafileds to store owner name). The creator can read only her post and the admin all post; many writer can post in the same content, only authorized editors can read all post.

  4. Ivan
    Ivan avatar
    478 posts
    16 Jun 2015
    16 Sep 2008
    Link to this post
    Hello everyone,

    I apologize to everyone for being a bit late on the schedule with the sample for implementing permissions on the Generic Content based modules. We are working on samples and we hope we'll be able to publish them very soon.

    Once again, my sincerest apologies.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered