From: Tim Düsterhus Date: Wed, 16 Aug 2017 21:04:29 +0000 (+0200) Subject: Add UserProfile::getNeverPermission() for consistency w/ SessionHandler X-Git-Tag: 3.1.0_Alpha_1~14 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e2a413b2953bb0441fb32da481742b7257f98e76;p=GitHub%2FWoltLab%2FWCF.git Add UserProfile::getNeverPermission() for consistency w/ SessionHandler see 5b078ab8e2b1d19ba27dcc8065f68e8e7683ad5f --- diff --git a/wcfsetup/install/files/lib/data/user/UserProfile.class.php b/wcfsetup/install/files/lib/data/user/UserProfile.class.php index 61db5c41cf..14a985fbf4 100644 --- a/wcfsetup/install/files/lib/data/user/UserProfile.class.php +++ b/wcfsetup/install/files/lib/data/user/UserProfile.class.php @@ -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. *