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

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