From 98d89c1af9553c32d566f6e5182639c4c201b448 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 7 Oct 2017 22:59:06 +0200 Subject: [PATCH] Fixed issue 63 in Modules --- Account/Account.php | 12 ++++++++++++ Account/AccountManager.php | 5 +++++ Account/PermissionType.php | 12 ++++++------ DataStorage/Database/RelationType.php | 14 +++++++------- 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/Account/Account.php b/Account/Account.php index b8e0f4e4d..2ce5905c6 100644 --- a/Account/Account.php +++ b/Account/Account.php @@ -193,6 +193,18 @@ class Account implements ArrayableInterface, \JsonSerializable return $this->l11n; } + /** + * Get groups. + * + * @return array + * + * @since 1.0.0 + */ + public function getGroups() : array + { + return $this->groups; + } + /** * Set localization. * diff --git a/Account/AccountManager.php b/Account/AccountManager.php index c8bfed69b..fdd39b316 100644 --- a/Account/AccountManager.php +++ b/Account/AccountManager.php @@ -102,6 +102,11 @@ class AccountManager implements \Countable return $this->accounts[$id] ?? new NullAccount(); } + public function getAuth() : Auth + { + return $this->auth; + } + /** * Add account. * diff --git a/Account/PermissionType.php b/Account/PermissionType.php index 4722dd7e7..92d15cd6e 100644 --- a/Account/PermissionType.php +++ b/Account/PermissionType.php @@ -32,10 +32,10 @@ use phpOMS\Stdlib\Base\Enum; */ abstract class PermissionType extends Enum { - /* public */ const NONE = 0; - /* public */ const READ = 1; - /* public */ const CREATE = 2; - /* public */ const MODIFY = 4; - /* public */ const DELETE = 8; - /* public */ const PERMISSION = 16; + /* public */ const NONE = 1; + /* public */ const READ = 2; + /* public */ const CREATE = 4; + /* public */ const MODIFY = 8; + /* public */ const DELETE = 16; + /* public */ const PERMISSION = 32; } diff --git a/DataStorage/Database/RelationType.php b/DataStorage/Database/RelationType.php index aedbcd0f4..2ce47c83c 100644 --- a/DataStorage/Database/RelationType.php +++ b/DataStorage/Database/RelationType.php @@ -30,11 +30,11 @@ use phpOMS\Stdlib\Base\Enum; */ abstract class RelationType extends Enum { - /* public */ const NONE = 0; - /* public */ const NEWEST = 1; - /* public */ const BELONGS_TO = 2; - /* public */ const OWNS_ONE = 4; - /* public */ const HAS_MANY = 8; - /* public */ const ALL = 16; - /* public */ const REFERENCE = 32; + /* public */ const NONE = 1; + /* public */ const NEWEST = 2; + /* public */ const BELONGS_TO = 4; + /* public */ const OWNS_ONE = 8; + /* public */ const HAS_MANY = 16; + /* public */ const ALL = 32; + /* public */ const REFERENCE = 64; }