diff --git a/MANUAL.md b/MANUAL.md index 59bc59ea..4501a55b 100644 --- a/MANUAL.md +++ b/MANUAL.md @@ -940,6 +940,14 @@ Tags are very powerfull to help you organize your pages. As in __W__, there is n Tags can be set in the [left panel of the editor interface](#left-panel) using comma to separate tags, or by using the multi edit tool in the [Home menu bar > Edit](#home-menu). +##### Privacy + +Pages have 3 possible levels of privacy: + +- **public** Free to read for every [visitor](#visitor). +- **private** Hidden to [visitor](#visitor), but accessible to [reader users](#reader). +- **not published** Only readable for users allowed to edit the page. + ##### Date This metadata can be set manually by the page editors. @@ -1027,6 +1035,8 @@ Count the number of time the page is opened is opened. > level : 1 +Reader users are allowed to read [private pages](#privacy). + #### Invite Editor > level : 2 @@ -1038,13 +1048,14 @@ Invite Editors are the lowest editor status possible. They can only access the [ > level : 3 - Can create pages and edit them. -- Can only edit pages when listed as [author](#authors) +- Can only edit pages when listed as [author](#authors). #### Super Editor > level : 4 -- Can edit any pages they like (they will be added as [author](#authors) of the page). +- Can edit any pages they like. +- Can manage users as [author](#authors) of a page. - Can use the home menu and media menu to access powerfull features. #### Administrator diff --git a/app/class/Controllerapipage.php b/app/class/Controllerapipage.php index 8ff81c26..b07f7532 100644 --- a/app/class/Controllerapipage.php +++ b/app/class/Controllerapipage.php @@ -84,7 +84,6 @@ public function update(string $page) if ($this->page->datemodif() == $oldpage->datemodif()) { $this->page->updateedited(); - $this->page->addauthor($this->user->id()); if ($this->pagemanager->update($this->page)) { http_response_code(200); header('Content-type: application/json; charset=utf-8'); @@ -137,7 +136,6 @@ public function put(string $page) $this->shortresponse(401, 'Page already exist but user cannot update it'); } $this->page = new Page(array_merge($this->recievejson(), ['id' => $page])); - $this->page->addauthor($this->user->id()); if ($this->pagemanager->update($this->page)) { http_response_code($exist ? 200 : 201); } else { diff --git a/app/class/Controllerpage.php b/app/class/Controllerpage.php index 85160c22..4681f61f 100644 --- a/app/class/Controllerpage.php +++ b/app/class/Controllerpage.php @@ -454,7 +454,7 @@ public function update($page) if ($this->importpage()) { if ($this->canedit()) { - // Check if someone esle edited the page during the editing. + // Check if someone else edited the page during the editing. $oldpage = clone $this->page; $this->page->hydrate($_POST); @@ -465,7 +465,6 @@ public function update($page) $this->routedirect('pageedit', ['page' => $this->page->id()]); } else { $this->page->updateedited(); - $this->page->addauthor($this->user->id()); $this->page->removeeditby($this->user->id()); $this->pagemanager->update($this->page);