Publish from private repository

This commit is contained in:
Gitea Actions
2026-08-01 11:51:13 +00:00
commit 0304b03201
694 changed files with 69367 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
namespace MyOffice.Services.Account;
using Data.Models.Accounts;
/// <summary>
/// Account access checks shared by service mutations (motions, settings, invites).
/// </summary>
public static class AccountAcl
{
public static AccountAccess? GetUserAccess(Account account, Guid userId) =>
account.AccessRights?.FirstOrDefault(x => x.UserId == userId);
public static bool CanWrite(Account account, Guid userId) =>
GetUserAccess(account, userId)?.IsAllowWrite == true;
public static bool CanManage(Account account, Guid userId) =>
GetUserAccess(account, userId)?.IsAllowManage == true;
}