Improve default category permission implementation
authorMatthias Schmidt <gravatronics@live.com>
Tue, 19 Aug 2014 17:11:09 +0000 (19:11 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 19 Aug 2014 17:11:09 +0000 (19:11 +0200)
wcfsetup/install/files/lib/data/category/Category.class.php

index dd7db4e8d4f7314b895e240d1615d7f5466530ed..bf42a494c0c231a1b02c16e53fb770de9cdfcc5b 100644 (file)
@@ -166,6 +166,10 @@ class Category extends ProcessibleDatabaseObject implements IPermissionObject, I
                        return $this->getParentCategory()->getPermission($permission);
                }
                
+               if ($this->getObjectType()->defaultpermission !== null) {
+                       return $this->getObjectType()->defaultpermission ? true : false;
+               }
+               
                return $this->defaultPermission;
        }