|
Thank you all for viewing my post. I got a question, and I don't have any clue.
I have implemented the IPermissionProvider interface, and in the method GetDefaultStereotypes, I define a custom permission for a custom role and a default role. However, in the web interface "Edit Role" page, the permission is not effective
for the custom role "CustomRole", but is in effective for the default role "Administrator".
public IEnumerable<PermissionStereotype> GetDefaultStereotypes() {
return new[] {
new PermissionStereotype {
Name = "CustomRole",
Permissions = new[] {CustomPermission}
},
new PermissionStereotype {
Name = "Administrator",
Permissions = new[] {CustomPermission}
}
};
}
For the custom role "CustomRole", I created it through admin web interface. Is there a way to create it in the code?
And my actual question is how to make the "CustomPermission" in effective by default for the "CustomRole"? So I don't need to select the "Allow" checkbox manually for each custom roles.
Many Thanks.
|