diff options
| author | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-05-04 03:02:01 +0300 |
|---|---|---|
| committer | George Halkiadakis <gchalkiadakis@sklavenitis.co.gr> | 2023-05-04 03:02:01 +0300 |
| commit | 63f714d5a78b765c117ebf6bbdfdbd748dd45644 (patch) | |
| tree | 87a4db40e1ff699222ccfdf699a3904d1c665bfc /public/app/extends | |
| parent | 931a93cd7bae092e2752064568cebe407d2bf46e (diff) | |
| download | gyraf1gov-63f714d5a78b765c117ebf6bbdfdbd748dd45644.tar.gz gyraf1gov-63f714d5a78b765c117ebf6bbdfdbd748dd45644.tar.bz2 gyraf1gov-63f714d5a78b765c117ebf6bbdfdbd748dd45644.zip | |
authentication; invitation; activation; base form setup
Diffstat (limited to 'public/app/extends')
| -rw-r--r-- | public/app/extends/App_manager.php | 4 | ||||
| -rw-r--r-- | public/app/extends/App_user.php | 63 | ||||
| -rw-r--r-- | public/app/extends/Cache_service.php | 19 |
3 files changed, 32 insertions, 54 deletions
diff --git a/public/app/extends/App_manager.php b/public/app/extends/App_manager.php index 8e6ce95..b003015 100644 --- a/public/app/extends/App_manager.php +++ b/public/app/extends/App_manager.php @@ -53,7 +53,9 @@ class App_manager extends UserManager } - + /** ?? + * + */ public function login_user() { diff --git a/public/app/extends/App_user.php b/public/app/extends/App_user.php index 9aed489..6e93969 100644 --- a/public/app/extends/App_user.php +++ b/public/app/extends/App_user.php @@ -12,14 +12,6 @@ use Registry; * this way it specializes the UserManagement * according to this app's special rules * - * Add privileges concept - * --- - * A Class_user has privileges (which are deferent than Roles) - * In fact, privileges extend the authorization requirements for users - * - * Authorized content is marked with some 'minimum Privilege' - * So the content is available to the READER(s) that have certain Privileges - * */ class App_user extends User { @@ -29,18 +21,20 @@ class App_user extends User */ private $id; - /** user privileges - * @var array + /** sex (gender) + * @var int (1 = male, 2 = female ) */ - private $privileges = []; + private $sex; /** user name - * @var string + * @var string : first_name +' '+ last_name */ private $name; + + /** SETTERS AND GETTERS - * for id, name, privileges attributes + * for id, name, attributes * ------------------------------------------------------------------------- */ @@ -68,54 +62,55 @@ class App_user extends User } - // name + // sex // --- -- -- - - - - /** getName + /** getSex() * @return int */ - public function getName(): string + public function getSex(): int { - return $this->name; + return $this->sex; } - /** setName() + + /** setSex() * - * @param string : user's full name + * @param int : sex (id) * * @return User */ - public function setName(string $name): self + public function setSex(int $sex): self { - $this->name = $name; + $this->sex = $sex; return $this; } - - // privileges + + + // name // --- -- -- - - - - /** getPrivileges - * - * @return privileges (array) + /** getName + * @return string */ - public function getPrivileges(): array + public function getName(): string { - return $this->privileges; + return $this->name; } - - /** setPrivileges() + /** setFirstName() * - * @param array $privileges + * @param string : user's full name * * @return User */ - public function setPrivileges(array $privileges): self + public function setName(string $name): self { - $this->privileges = $privileges; + $this->name = $name; return $this; } - + + }
\ No newline at end of file diff --git a/public/app/extends/Cache_service.php b/public/app/extends/Cache_service.php index c435b75..05fd39e 100644 --- a/public/app/extends/Cache_service.php +++ b/public/app/extends/Cache_service.php @@ -36,25 +36,6 @@ class Cache_service } - public static function privileges_hierarchy( $options = 0 ) - { - return proxy( - [\app\models\Access_model::class, 'privileges'], - [], CACHE_ROOT_TTL, - $options - ); - } - - public static function pages_list( $options = 0 ) - { - return proxy( - [\app\models\Cms_model::class, 'pages'], - [], CACHE_ROOT_TTL, - $options - ); - } - - /** entity * * create and retrieve a cached array of some entity |
