[icinga-checkins] icinga.org: icinga-web/r1.5: * LDAP fix based on doctrine bug?

git at icinga.org git at icinga.org
Thu Aug 25 13:37:53 CEST 2011


Module: icinga-web
Branch: r1.5
Commit: 8b0cff16018726ad0ae4884b8ed8f8187f0c08be
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=8b0cff16018726ad0ae4884b8ed8f8187f0c08be

Author: Marius Hein <marius.hein at netways.de>
Date:   Thu Aug 25 13:37:02 2011 +0200

* LDAP fix based on doctrine bug?

---

 .../AppKit/lib/database/models/NsmPrincipal.php    |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/modules/AppKit/lib/database/models/NsmPrincipal.php b/app/modules/AppKit/lib/database/models/NsmPrincipal.php
index 3f3697a..b4d4b28 100644
--- a/app/modules/AppKit/lib/database/models/NsmPrincipal.php
+++ b/app/modules/AppKit/lib/database/models/NsmPrincipal.php
@@ -52,18 +52,18 @@ class NsmPrincipal extends BaseNsmPrincipal {
             return true;
         }
 
-        if ($this->principal_role_id > 0 && $this->principal_user_id > 0) {
+        if ($this->principal_role_id && $this->principal_user_id) {
             throw new AppKitDoctrineException('Unexpected principal condition, please check the object');
         }
 
-        if ($this->principal_role_id > 0) {
+        if ($this->principal_role_id) {
             $this->principal_type = self::TYPE_ROLE;
         }
 
-        elseif($this->principal_user_id > 0) {
+        elseif($this->principal_user_id) {
             $this->principal_type = self::TYPE_USER;
         }
 
         return true;
     }
-}
\ No newline at end of file
+}





More information about the icinga-checkins mailing list