Users module: accounts, groups, permissions with needs, manager:create-user
This commit is contained in:
1 parent
08289db744
commit
f86f5aea28
25 files changed
+744
-58
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace IriksIT\Manager\Support;
|
||||
|
||||
/**
|
||||
* One thing an account can be allowed to do. A group holds a list of these values;
|
||||
* a module declares the ones it adds (Module::permissions()).
|
||||
*/
|
||||
final readonly class Permission
|
||||
{
|
||||
/**
|
||||
* @param string $value `<module>.<action>`, also the name of the gate
|
||||
* @param string $label what the group form says next to the tick box
|
||||
* @param string $section the heading it is listed under
|
||||
* @param list<string> $needs values this one is useless without; a group that gets this gets those too
|
||||
*/
|
||||
public function __construct(
|
||||
public string $value,
|
||||
public string $label,
|
||||
public string $section,
|
||||
public array $needs = [],
|
||||
) {}
|
||||
}
|
||||
Reference in new issue
Block a user