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.
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.
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.
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.
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
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
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
Hi Matt,
Did you ever find a good solution for this ?
I'm trying to something very similar myself.
Thanks
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
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
is working on a reply...