sync full source from private myoffice

This commit is contained in:
myoffice-sync
2026-08-05 10:55:09 +00:00
parent 874796c860
commit 405abdfe69
714 changed files with 70352 additions and 234 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;
}