Users module: accounts, groups, permissions with needs, manager:create-user

This commit is contained in:
Matthijs Iriks committed 2026-12-04 01:25:29 +01:00
1 parent 08289db744
commit f86f5aea28
25 files changed
+744 -58

No files matched your search

+5 -4
View File
@@ -3,6 +3,7 @@
namespace IriksIT\Manager\Modules\Posts;
use IriksIT\Manager\Modules\BaseModule;
use IriksIT\Manager\Support\Permission;
class PostsModule extends BaseModule
{
@@ -24,10 +25,10 @@ class PostsModule extends BaseModule
public function permissions(): array
{
return [
'posts.view' => 'See the posts, drafts included',
'posts.write' => 'Write and change posts',
'posts.publish' => 'Publish and unpublish posts',
'posts.delete' => 'Delete posts',
new Permission('posts.view', 'See the posts, drafts included', 'Posts'),
new Permission('posts.write', 'Write posts: create drafts and change them', 'Posts', needs: ['posts.view']),
new Permission('posts.publish', 'Publish, schedule and unpublish posts, and change posts that are live', 'Posts', needs: ['posts.view', 'posts.write']),
new Permission('posts.delete', 'Delete posts', 'Posts', needs: ['posts.view']),
];
}