예제 #1
0
        public async Task <bool> HasUserAccess(int walletId, string userId, WalletRole role = WalletRole.Normal)
        {
            var wallet = await _walletRepository.GetWithoutDependencies(walletId, userId);

            if (wallet == null)
            {
                return(false);
            }

            return(true);
        }
예제 #2
0
 public async Task <bool> HasUserAccess(string walletId, string userId, WalletRole role = WalletRole.Normal)
 {
     return(await HasUserAccess(walletId.ToDeobfuscated(), userId, role));
 }
 private Result ChangeUserAssignment(UserWallet userWallet, WalletRole role)
 {
     userWallet.Role = role;
     _walletRepository.Update(userWallet);
     return(Result.Success());
 }
예제 #4
0
 public static bool HasAllPrivileges(this WalletRole role)
 {
     return(role == WalletRole.Admin || role == WalletRole.Creator);
 }