]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Tools/UserEntityWatchOptions.php
Fixed OIDC Logout
[bookstack] / app / Activity / Tools / UserEntityWatchOptions.php
index 08fbe2e8d94dab240186d2fc2c54c819bfa337c4..231204fdf67b1f9f54fcbb90636fbea5de15ff24 100644 (file)
@@ -51,15 +51,20 @@ class UserEntityWatchOptions
         return null;
     }
 
-    public function updateWatchLevel(string $level): void
+    public function updateLevelByName(string $level): void
     {
         $levelValue = WatchLevels::levelNameToValue($level);
-        if ($levelValue < 0) {
+        $this->updateLevelByValue($levelValue);
+    }
+
+    public function updateLevelByValue(int $level): void
+    {
+        if ($level < 0) {
             $this->remove();
             return;
         }
 
-        $this->updateLevel($levelValue);
+        $this->updateLevel($level);
     }
 
     public function getWatchMap(): array