]> BookStack Code Mirror - bookstack/blobdiff - app/Console/Commands/RegeneratePermissions.php
Renamed and cleaned up existing permission service classes use
[bookstack] / app / Console / Commands / RegeneratePermissions.php
index 558ae9feaecbdea8f21aea820b85fdad9f3a544c..3396a445f0f531b4680302a6fae931dd5db1e0b0 100644 (file)
@@ -42,11 +42,11 @@ class RegeneratePermissions extends Command
     {
         $connection = DB::getDefaultConnection();
 
-        if ($this->hasOption('database')) {
+        if ($this->option('database')) {
             DB::setDefaultConnection($this->option('database'));
         }
 
-        $this->permissionBuilder->buildJointPermissions();
+        $this->permissionBuilder->rebuildForAll();
 
         DB::setDefaultConnection($connection);
         $this->comment('Permissions regenerated');