Skip to content

Commit

Permalink
Fixed issue #17052: Permission for owner of survey
Browse files Browse the repository at this point in the history
Dev: owner_id is string
Dev: we already check if $iUserID is not empty
Dev: need equal, not identical
  • Loading branch information
Shnoulle committed Feb 3, 2021
1 parent 8256739 commit 95769fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/models/Permission.php
Expand Up @@ -573,7 +573,7 @@ public function hasPermission($iEntityID, $sEntityName, $sPermission, $sCRUD = '

/* Always return true if you are the owner : this can be done in core plugin ? */
// TODO: give the rights to owner adding line in permissions table, so it will return true with the normal way
if ($iUserID === $this->getEntityOwnerId($iEntityID, $sEntityName)) {
if ($iUserID == $this->getEntityOwnerId($iEntityID, $sEntityName)) {
return true;
}

Expand Down

0 comments on commit 95769fe

Please sign in to comment.