- A lot of small important bugfixes

This commit is contained in:
mcndave committed 2021-10-22 13:39:22 +00:00
1 parent f72115aab4
commit 8892edd19e
8 files changed
+90 -8

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
<?php
use function DI\autowire, DI\create, DI\get;
use Storage\Session;
use Taxus\{ Privilege, Taxus, PermissionGrantInterface, DefaultPermissionGrant };
use Psr\Http\Message\ServerRequestInterface;
return [
Taxus::class => function ($c) {
return ( new Taxus( $c->get(PermissionGrantInterface::class) ) )->add(
[ new Privilege("dev", "Is a developper of this application."), "is_dev" ],
[ new Privilege("admin", "Can manage mostly everything from this application."), "is_admin" ],
[ new Privilege("user", "Is an authenticated user."), "is_user" ],
[ new Privilege("anonymous", "Is an anonymous (unauthenticated) user."), "is_anonymous" ],
);
},
PermissionGrantInterface::class => create(DefaultPermissionGrant::class)->constructor(get(ServerRequestInterface::class), get(Session::class)),
];