Now if URL www.domain.com/User comes in, it will be redirected to UserController, Index() method.
And this is ok. My question is :
What if I have Membe groups called "admin", "admin1". I wan't to restrict access to this url(page) dynamicly from Umbraco admin. To do this, I created dummy page that is called User, documentType is dummyDC.
Then I add public acces restriction for member group admin.
Problem is, that still users witouth this member group can acces the page.
When dose Umbraco do this authorization?
Approuch that is working is to use DocumentType "User" and Template "Index". Then to create document(page) called User with DC User and Template Index. But in that case, I have to work RenderModel in my controller and view or to extend that model or to pass CurrentTemplate(myModel); And also, I can't have nice and clean URL if I am using parameters like www.domain.com/user/id. It will look like www.domain.com/user?id=id.
With rout definition I can create nice url, I don't need to work with RenderModel, but I dont have dynamic roles?
Custom route and membership authorization
Dear all,
I have implemented custom route :
Now if URL www.domain.com/User comes in, it will be redirected to UserController, Index() method.
And this is ok. My question is :
What if I have Membe groups called "admin", "admin1". I wan't to restrict access to this url(page) dynamicly from Umbraco admin. To do this, I created dummy page that is called User, documentType is dummyDC.
Then I add public acces restriction for member group admin.
Problem is, that still users witouth this member group can acces the page.
When dose Umbraco do this authorization?
Approuch that is working is to use DocumentType "User" and Template "Index". Then to create document(page) called User with DC User and Template Index. But in that case, I have to work RenderModel in my controller and view or to extend that model or to pass CurrentTemplate(myModel); And also, I can't have nice and clean URL if I am using parameters like www.domain.com/user/id. It will look like www.domain.com/user?id=id.
With rout definition I can create nice url, I don't need to work with RenderModel, but I dont have dynamic roles?
is working on a reply...