Skip to content

Commit

Permalink
[modxcms#6934] Fix for only showing the resource delete button if all…
Browse files Browse the repository at this point in the history
… permissions are given
  • Loading branch information
Mark-H committed Mar 20, 2012
1 parent d44de7a commit 1688f67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/controllers/default/resource/resource.class.php
Expand Up @@ -108,7 +108,7 @@ public function setPermissions() {
$this->canEdit = $this->modx->hasPermission('edit_document');
$this->canCreate = $this->modx->hasPermission('new_document');
$this->canPublish = $this->modx->hasPermission('publish_document');
$this->canDelete = $this->modx->hasPermission('delete_document');
$this->canDelete = ($this->modx->hasPermission('delete_document') && $this->resource->checkPolicy(array('save' => true, 'delete' => true)));
$this->canDuplicate = $this->resource->checkPolicy('save');
}

Expand Down

0 comments on commit 1688f67

Please sign in to comment.