public virtual async Task <bool> IsGrantedAsync(string permissionName) { var userIdHasValue = AbpSession.UserId.HasValue && await _userManager.IsGrantedAsync(AbpSession.UserId.Value, permissionName); return(userIdHasValue); }
public virtual async Task <bool> IsGrantedAsync(long userId, string permissionName) { return(await _userManager.IsGrantedAsync(userId, permissionName)); }
public async Task <bool> IsGrantedAsync(string permissionName) { return(AbpSession.UserId.HasValue && await _userManager.IsGrantedAsync(AbpSession.UserId.Value, permissionName)); }