OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)

This commit is contained in:
wangruiguo
2026-09-03 18:49:20 +08:00
commit d647428529
3501 changed files with 1988906 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace Leantime\Core\Auth\Contracts;
/**
* Narrow contract the permission engine depends on for project-level data access and the
* per-project role, implemented by the Projects domain service.
*
* The engine lives in Core and must not depend on the 2,900-line Projects god-service
* directly; it depends on this abstraction (bound to Projects in PermissionServiceProvider),
* which also keeps the surface small and sidesteps circular-reference risk.
*/
interface ChecksProjectAccess
{
/**
* Whether the user can access the given project (assigned, or via the project's
* `psettings` — admin/owner bypass handled by the implementation/engine).
*/
public function isUserAssignedToProject(int $userId, int $projectId): bool;
/**
* The user's explicit role within the project, or '' when none is set (inherits global).
* Returns the stored role key as a string.
*/
public function getProjectRole(int $userId, int $projectId): string;
}