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,33 @@
<?php
namespace Leantime\Core\Auth\Permissions;
/**
* Contract implemented by each domain's (and plugin's) permission catalog.
*
* Implementations live at `app/Domain/{Domain}/Permissions/{Domain}Permissions.php`
* (and the plugin equivalent) and are auto-discovered at boot by
* {@see PermissionRegistry}, mirroring how `register.php` event listeners are
* discovered. The declared {@see Permission} objects are the single source of truth
* for the `domain.action` vocabulary — `permissions:sync` writes them into the
* `zp_permissions` table so an administrator can assign them to roles.
*
* Concrete implementations should also expose typed string constants
* (e.g. `const CREATE = 'tickets.create';`) so call sites reference constants
* rather than magic strings.
*/
interface ProvidesPermissions
{
/**
* The capabilities this provider contributes to the vocabulary.
*
* @return array<int, Permission>
*/
public function permissions(): array;
/**
* The domain key these permissions belong to (e.g. `tickets`). Used for grouping
* in the admin UI and as the `zp_permissions.domain` column value.
*/
public function domain(): string;
}