I have old complex project which includes user roles. In file Rights.sitemap I have code like this:
<Page url="~/Account/Account.aspx" rightsAny="OwnPesonalDetailesView, OwnPasswordChange" />
<Page url="~/Account/PersonalData/PersonalData.aspx" rightsAny="OwnPersonalDataChange, OwnPersonalDataChange" />
<Page url="~/Account/PasswordChange/PasswordChange.aspx" rightsAny="OwnPasswordChange" />
<Page url="~/Account/LoginHistory/LoginHistory.aspx" />
I am trying to understand what 'rightsAny' tag means in this context. I tried to google it but without success. When I crtl+F and search for 'rightsAny' it only occurs in this .sitemap file.
Values after tag 'rightsAny' refer to RightNameValues.cs which code sample is below:
public const string OwnPasswordChange = "OwnPasswordChange";
public const string OwnPersonalDataChange = "OwnPersonalDataChange";
public const string OwnPesonalDetailesView = "OwnPesonalDetailesView";
public const string PartnersActivate = "PartnersActivate";
I can use this right in context like below:
if(Foo.Common.Application.AppContext.Current.Operator.HasRight(RightNameValues.OwnPasswordChange))
{
Label2.Text = "This user have rights to change password";
}
But I tried all combination of setting line ex:
<Page url="~/Account/PasswordChange/PasswordChange.aspx"
rightsAny="OwnPasswordChange" />
and I do not see any changes on site PasswordChange.aspx. Maybe some of you know anything about my problem?