Skip to content

Commit

Permalink
Access control change - /changes/ endpoint now available to all users…
Browse files Browse the repository at this point in the history
… with read access to that dataset
  • Loading branch information
JaseMK committed May 11, 2022
1 parent 108b6b7 commit 4f6993f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions module/apif-core/src/Controller/ActivityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ public function get($id) {
$permissions = $this->getPermissionsOnDataset($roles, $id);

// ######
// Access is granted to activity log if user/key has both READ and WRITE permission on this dataset
// Access is granted to activity log if user/key has READ permission on this dataset
// ######
if ($permissions['read'] AND $permissions['write']) {
//if ($permissions['read'] AND $permissions['write']) {
if ($permissions['read']) {
$activityLogId = $this->_config['activityLog']['dataset'];
// ONLY RETRIEVE WRITE ACTIONS, NOT READS.
$query = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "0.9.3"
"version": "0.9.4"
},
"tags": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "0.9.3"
"version": "0.9.4"
},
"tags": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "0.9.3"
"version": "0.9.4"
},
"tags": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "0.9.3"
"version": "0.9.4"
},
"tags": [
{
Expand Down

0 comments on commit 4f6993f

Please sign in to comment.