[Tickets #13049] Re: only the admin user can create ressources

noreply at bugs.horde.org noreply at bugs.horde.org
Mon Jul 21 09:20:08 UTC 2014


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/13049
------------------------------------------------------------------------------
  Ticket             | 13049
  Updated By         | Jasper.Olbrich at students.uni-marburg.de
  Summary            | only the admin user can create ressources
  Queue              | Kronolith
  Version            | Git master
  Type               | Enhancement
  State              | Resolved
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Michael Rubinsky
------------------------------------------------------------------------------


Jasper.Olbrich at students.uni-marburg.de (2014-07-21 09:20) wrote:

Still buggy in current git master, non-admin users see the "+" Icon,  
but get "You are not allowed to create new resources."

This patch should fix it:

diff --git a/kronolith/lib/Ajax/Application/Handler.php  
b/kronolith/lib/Ajax/Application/Handler.php
index 76fe5da..a400b79 100644
--- a/kronolith/lib/Ajax/Application/Handler.php
+++ b/kronolith/lib/Ajax/Application/Handler.php
@@ -1046,7 +1046,7 @@ class Kronolith_Ajax_Application_Handler extends  
Horde_Core_Ajax_Application_Han
              if (!$calendar_id) {
                  // New resource
                  // @TODO: Groups.
-                if (!$GLOBALS['registry']->isAdmin()) {
+                if (!$GLOBALS['registry']->isAdmin() &&  
!$GLOBALS['injector']->getInstance('Horde_Core_Perms')->hasAppPermission('resource_management'))  
{
                      $GLOBALS['notification']->push(_("You are not  
allowed to create new resources."), 'horde.error');
                      return $result;
                  }







More information about the bugs mailing list