]> BookStack Code Mirror - bookstack/blobdiff - app/Console/Commands/RegeneratePermissions.php
Add Slovak translation
[bookstack] / app / Console / Commands / RegeneratePermissions.php
index bd221c1384816bbd8ffa46290ef856065fdcf852..966ee4a820841429148a19c3724003492909742b 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace BookStack\Console\Commands;
 
-use BookStack\Services\RestrictionService;
+use BookStack\Services\PermissionService;
 use Illuminate\Console\Command;
 
 class RegeneratePermissions extends Command
@@ -12,7 +12,7 @@ class RegeneratePermissions extends Command
      *
      * @var string
      */
-    protected $signature = 'permissions:regen';
+    protected $signature = 'bookstack:regenerate-permissions';
 
     /**
      * The console command description.
@@ -24,18 +24,18 @@ class RegeneratePermissions extends Command
     /**
      * The service to handle the permission system.
      *
-     * @var RestrictionService
+     * @var PermissionService
      */
-    protected $restrictionService;
+    protected $permissionService;
 
     /**
      * Create a new command instance.
      *
-     * @param RestrictionService $restrictionService
+     * @param PermissionService $permissionService
      */
-    public function __construct(RestrictionService $restrictionService)
+    public function __construct(PermissionService $permissionService)
     {
-        $this->restrictionService = $restrictionService;
+        $this->permissionService = $permissionService;
         parent::__construct();
     }
 
@@ -46,6 +46,7 @@ class RegeneratePermissions extends Command
      */
     public function handle()
     {
-        $this->restrictionService->buildEntityPermissions();
+        $this->permissionService->buildJointPermissions();
+        $this->comment('Permissions regenerated');
     }
 }