summaryrefslogtreecommitdiff
path: root/public/app/extends
diff options
context:
space:
mode:
Diffstat (limited to 'public/app/extends')
-rw-r--r--public/app/extends/App_manager.php4
-rw-r--r--public/app/extends/App_user.php63
-rw-r--r--public/app/extends/Cache_service.php19
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