Skip to content

Commit

Permalink
Bug: 14069 Fix activating the 'delete' button for resources
Browse files Browse the repository at this point in the history
This is not getting enabled in the UI when a non-admin user
has the resource_management application permission.
  • Loading branch information
mrubinsk committed Jul 30, 2015
1 parent f82558a commit 6f136e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion kronolith/lib/Calendar/Resource.php
Expand Up @@ -103,7 +103,12 @@ public function display()
*/
public function toHash()
{
$owner = $GLOBALS['registry']->isAdmin();
global $registry, $injector;

$owner = $registry->isAdmin() ||
$injector->getInstance('Horde_Core_Perms')
->hasAppPermission('resource_management');

$hash = parent::toHash();

$hash['id'] = $this->_resource->getId();
Expand Down

0 comments on commit 6f136e8

Please sign in to comment.