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

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