Added CurrentUser.GetAllClaims()

pull/707/head
Halil ibrahim Kalkan 6 years ago
parent 522145549f
commit 54e2afd7a1

@ -46,6 +46,11 @@ namespace Volo.Abp.Users
return _principalAccessor.Principal?.Claims.Where(c => c.Type == claimType).ToArray() ?? EmptyClaimsArray;
}
public virtual Claim[] GetAllClaims()
{
return _principalAccessor.Principal?.Claims.ToArray() ?? EmptyClaimsArray;
}
public bool IsInRole(string roleName)
{
return FindClaims(AbpClaimTypes.Role).Any(c => c.Value == roleName);

@ -35,6 +35,9 @@ namespace Volo.Abp.Users
[NotNull]
Claim[] FindClaims(string claimType);
[NotNull]
Claim[] GetAllClaims();
bool IsInRole(string roleName);
}
}

Loading…
Cancel
Save