Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    Aug 31, 2012 @ 12:38
    Matt Taylor
    0

    Adding custom properties to membership groups - possible?

    I have an Umbraco site that is using membership groups to hadle page access for members on a subscription basis and it all works great.

    There is now a new requirement for some 3rd party integration.
    The 3rd party application needs to check which group a member belongs to and then map this to its own security roles.

    I don't want to hard code the mappings i.e. Group A = Role1 & Role 2 as I'd like the flexibilty to change it within Umbraco.

    My immediate thought was to extend the groups functionality which currently has just one property called 'Name' by adding some more properties to contain the mappings.

    Can this be done?

    Regards,

    Matt

     

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Sep 01, 2012 @ 17:30
    Jeroen Breuer
    0

    It can't be done on the grouping, but each member is of a member type and that works the same as document types so you can add custom properties there.

    Jeroen

  • Matt Taylor 873 posts 2086 karma points
    Sep 03, 2012 @ 11:35
    Matt Taylor
    0

    Thanks for the reply Jeroen,

    Adding some 'Member Type' properties will enable me to set them on a per member basis, however there are too many members so I need to be able to do it by group.

    Regards,

    Matt

  • Peter Karas 9 posts 30 karma points
    Jul 05, 2013 @ 18:40
    Peter Karas
    0

    Hi Matt,

    Did you ever find a good solution for this ?

    I'm trying to something very similar myself.

    Thanks

  • Matt Taylor 873 posts 2086 karma points
    Jul 06, 2013 @ 12:14
    Matt Taylor
    0

    Hello Peter,

    I created a new document type to represent a group and added what ever properties I want to it.

    I then created a content node using that document type, named it the same as the group and set the properties.

    My code then does a simple lookup to match the two and read the properties.

    Regards,

    Matt

  • Peter Karas 9 posts 30 karma points
    Jul 06, 2013 @ 15:09
    Peter Karas
    0

    Thanks Matt,

    Thats interesting. I've gone for soemthing very similar but instead of a document type I used a custom DB table, to store the properties. I think I would have gone for your solution had I not already got other custom tables and a way to read and write to them from Umbraco already.

    Thanks again for sharing this !

    Regards

    Peter

Please Sign in or register to post replies

Write your reply to:

Draft