mirror of
https://github.com/flarum/core.git
synced 2025-10-10 22:44:25 +02:00
Simplify permissions and add API to register configurable ones
Lots of thought has gone into this; it will show up later when I do the admin permissions interface / category permissions :)
This commit is contained in:
@@ -5,6 +5,7 @@ use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Flarum\Core\Models\Notification;
|
||||
use Flarum\Core\Models\User;
|
||||
use Flarum\Core\Models\Post;
|
||||
use Flarum\Core\Models\Permission;
|
||||
use Closure;
|
||||
|
||||
class ServiceProvider extends IlluminateServiceProvider
|
||||
@@ -90,4 +91,9 @@ class ServiceProvider extends IlluminateServiceProvider
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected function permission($permission)
|
||||
{
|
||||
Permission::addPermission($permission);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user