I'm currently building a website which gets all member data from an external CRM by WCF services. I then want the users from the CRM to be able to log in on the site and edit their details. Also, I still want the administrators of Umbraco to be able to set up role protection on nodes which can be accessed when a CRM user has logged in.
Is there any way to do this? :-) I tried implementing the UmbracoMembershipProvider overriding the auth method which seems to work fine. The auth cookie is placed as it should. But when it comes to the whole Role protection thing, I'm a bit stuck.
Any help and/or hint on this is greatly appreciated!
Alright'y, I was going to implement the RoleProvider class, but was not sure if you then would be able to use the "Public Access"-function in the Umbraco content tree. I'll give it a spin ;-)
Yes, you will be able use "Public Access" to protect your pages either way (I have achieved this by overriding both). If you are not storing member data in Umbraco, you need to override both Provider's as listed below.
Also you may have to override "GetUser" method of the "UmbracoMembershipProvider" in order to get loggedIn user. Please check below link for more details.
Custom membership/role provider
Hi all,
I'm currently building a website which gets all member data from an external CRM by WCF services. I then want the users from the CRM to be able to log in on the site and edit their details. Also, I still want the administrators of Umbraco to be able to set up role protection on nodes which can be accessed when a CRM user has logged in.
Is there any way to do this? :-) I tried implementing the UmbracoMembershipProvider overriding the auth method which seems to work fine. The auth cookie is placed as it should. But when it comes to the whole Role protection thing, I'm a bit stuck.
Any help and/or hint on this is greatly appreciated!
Thanks a lot in advance.
- Bo
Off the top of my head: I think you need to implement a roleprovider also? If you check into your web.config file you'll find the following line
Not entirely sure, but I think you need this to assign access rights to pages.
Regards
Jesper
Hi Jesper,
Thanks for your help :-)
Alright'y, I was going to implement the RoleProvider class, but was not sure if you then would be able to use the "Public Access"-function in the Umbraco content tree. I'll give it a spin ;-)
Thanks again!
Bo
Here is some more info on how to keep the backend working :
http://our.umbraco.org/forum/developers/extending-umbraco/32984-Custom-Membership-Provider
Hi Bo,
Yes, you will be able use "Public Access" to protect your pages either way (I have achieved this by overriding both). If you are not storing member data in Umbraco, you need to override both Provider's as listed below.
is working on a reply...