log user name when user gets "access denied" for app
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 18 Aug 2014 09:09:29 +0000 (11:09 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 19 Aug 2014 15:04:10 +0000 (17:04 +0200)
Change-Id: Id7c5960433c546587a3b552e118425084934c23a
Reviewed-on: http://gerrit.tine20.com/customers/1004
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/Core.php

index e73b462..3068d79 100644 (file)
@@ -391,6 +391,8 @@ class Tinebase_Core
         }
         
         if (! $_ignoreACL && is_object(Tinebase_Core::getUser()) && ! Tinebase_Core::getUser()->hasRight($appName, Tinebase_Acl_Rights_Abstract::RUN)) {
+            if (Tinebase_Core::isLogLevel(Zend_Log::INFO)) Tinebase_Core::getLogger()->info(__METHOD__ . '::' . __LINE__ 
+                . ' User ' . Tinebase_Core::getUser()->accountDisplayName . '/' . Tinebase_Core::getUser()->getId() . ' has no right to access ' . $appName);
             throw new Tinebase_Exception_AccessDenied('No right to access application ' . $appName);
         }