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); }
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()); }
public static bool HasAllPrivileges(this WalletRole role) { return(role == WalletRole.Admin || role == WalletRole.Creator); }