Add UserProfile::getNeverPermission() for consistency w/ SessionHandler
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 16 Aug 2017 21:04:29 +0000 (23:04 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 16 Aug 2017 21:05:13 +0000 (23:05 +0200)
see 5b078ab8e2b1d19ba27dcc8065f68e8e7683ad5f

wcfsetup/install/files/lib/data/user/UserProfile.class.php

index 61db5c41cf1624a345d4f82887a79d6946cbc103..14a985fbf4c9ab763528ce4cda42449dcfb822e7 100644 (file)
@@ -601,6 +601,19 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject {
                return $this->groupData[$permission];
        }
        
+       /**
+        * Returns true if a permission was set to 'Never'. This is required to preserve
+        * compatibility, while preventing ACLs from overruling a 'Never' setting.
+        * 
+        * @param       string          $permission
+        * @return      boolean
+        */
+        public function getNeverPermission($permission) {
+               $this->loadGroupData();
+               
+               return (isset($this->groupData['__never'][$permission]));
+       }
+       
        /**
         * Returns the user title of this user.
         *