Skip to content

Commit

Permalink
Fix wrong permission check (id instead of uid)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasNo1 committed Sep 16, 2019
1 parent 55090f6 commit 709e47a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.2 - 2019-09-16
### Fixed
- Wrong permission check that resulted in non-admin users not having permission to publish entries

## 2.0.1 - 2019-08-21
### Fixed
- Allow anonymous for publish route
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "goldinteractive/craft3-publisher",
"description": "",
"version": "2.0.1",
"version": "2.0.2",
"license": "MIT",
"type": "craft-plugin",
"require": {
Expand All @@ -15,7 +15,7 @@
"extra": {
"handle": "publisher",
"name": "Publisher",
"schemaVersion": "2.0.1",
"schemaVersion": "2.0.2",
"developer": "Gold Interactive",
"developerUrl": "http://goldinteractive.ch",
"class": "goldinteractive\\publisher\\Publisher"
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/EntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function actionSave()
}

if ($draft->enabled) {
$this->requirePermission('publishEntries:'.$entry->sectionId);
$this->requirePermission('publishEntries:'.$entry->section->uid);
}

if ($publishAt !== null) {
Expand Down

0 comments on commit 709e47a

Please sign in to comment.