OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
41
app/Domain/Ideas/Permissions/IdeasPermissions.php
Normal file
41
app/Domain/Ideas/Permissions/IdeasPermissions.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Domain\Ideas\Permissions;
|
||||
|
||||
use Leantime\Core\Auth\Permissions\Permission;
|
||||
use Leantime\Core\Auth\Permissions\ProvidesPermissions;
|
||||
|
||||
/**
|
||||
* The Ideas permission vocabulary — the verbs only.
|
||||
*
|
||||
* Idea boards and items are PROJECT-scoped (each board belongs to one project; items belong to a
|
||||
* board), so every capability is evaluated against the user's role IN that project (projectScoped =
|
||||
* true, the default). The standard verbs auto-grant via the central matrix (readonly = view; editor
|
||||
* = create/edit/delete; manager+ = all), so no
|
||||
* {@see \Leantime\Core\Auth\Permissions\DefaultRolePermissions} change is required.
|
||||
*/
|
||||
final class IdeasPermissions implements ProvidesPermissions
|
||||
{
|
||||
public const VIEW = 'ideas.view';
|
||||
|
||||
public const CREATE = 'ideas.create';
|
||||
|
||||
public const EDIT = 'ideas.edit';
|
||||
|
||||
public const DELETE = 'ideas.delete';
|
||||
|
||||
public function domain(): string
|
||||
{
|
||||
return 'ideas';
|
||||
}
|
||||
|
||||
public function permissions(): array
|
||||
{
|
||||
return [
|
||||
new Permission(self::VIEW, 'View idea boards'),
|
||||
new Permission(self::CREATE, 'Create idea boards and ideas'),
|
||||
new Permission(self::EDIT, 'Edit ideas'),
|
||||
new Permission(self::DELETE, 'Delete idea boards and ideas'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user