36 lines
878 B
PHP
36 lines
878 B
PHP
<?php
|
||
|
||
namespace Leantime\Domain\Bom\Permissions;
|
||
|
||
use Leantime\Core\Auth\Permissions\Permission;
|
||
use Leantime\Core\Auth\Permissions\ProvidesPermissions;
|
||
|
||
/**
|
||
* BOM(物料清单)权限词汇。BOM 是项目作用域资源,所有能力按用户在所属项目中的角色评估。
|
||
*/
|
||
final class BomPermissions implements ProvidesPermissions
|
||
{
|
||
public const VIEW = 'bom.view';
|
||
|
||
public const CREATE = 'bom.create';
|
||
|
||
public const EDIT = 'bom.edit';
|
||
|
||
public const DELETE = 'bom.delete';
|
||
|
||
public function domain(): string
|
||
{
|
||
return 'bom';
|
||
}
|
||
|
||
public function permissions(): array
|
||
{
|
||
return [
|
||
new Permission(self::VIEW, 'View BOM'),
|
||
new Permission(self::CREATE, 'Create BOM'),
|
||
new Permission(self::EDIT, 'Edit BOM'),
|
||
new Permission(self::DELETE, 'Delete BOM'),
|
||
];
|
||
}
|
||
}
|