feat: add permission checking and task assignment handling in ProjectBoardHub

This commit is contained in:
2025-12-15 13:49:41 +03:30
parent 2a31b27f9b
commit 000af89fd7
8 changed files with 109 additions and 12 deletions

View File

@@ -56,6 +56,11 @@ public class AuthHelper : IAuthHelper
return Tools.DeserializeFromBsonList<int>(permissions); //Mahan
}
public bool HasPermission(int permission)
{
return GetPermissions().Any(x => x == permission);
}
public long CurrentAccountId()
{
return IsAuthenticated()

View File

@@ -12,6 +12,7 @@ public interface IAuthHelper
string CurrentAccountRole();
AuthViewModel CurrentAccountInfo();
List<int> GetPermissions();
bool HasPermission(int permission);
long CurrentAccountId();
string CurrentAccountMobile();