mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
use Identity::ID enum set
This commit is contained in:
parent
22fd5a74db
commit
5f76121c29
2 changed files with 18 additions and 6 deletions
|
|
@ -72,16 +72,24 @@ class Auth
|
||||||
);
|
);
|
||||||
|
|
||||||
// Init new certificate option
|
// Init new certificate option
|
||||||
$this->_options[0] = new Auth\Option\Identity(
|
$this->_options[
|
||||||
|
Auth\Option\Identity::ID_CRT_NEW
|
||||||
|
] = new Auth\Option\Identity(
|
||||||
$this
|
$this
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->_options[0]->setGroup(
|
$this->_options[
|
||||||
$this->_options[0]
|
Auth\Option\Identity::ID_CRT_NEW
|
||||||
|
]->setGroup(
|
||||||
|
$this->_options[
|
||||||
|
Auth\Option\Identity::ID_CRT_NEW
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->_options[0]->setLabel(
|
$this->_options[
|
||||||
0, null
|
Auth\Option\Identity::ID_CRT_NEW
|
||||||
|
]->setLabel(
|
||||||
|
Auth\Option\Identity::ID_CRT_NEW
|
||||||
);
|
);
|
||||||
|
|
||||||
// Search database for auth records
|
// Search database for auth records
|
||||||
|
|
@ -100,7 +108,9 @@ class Auth
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->_options[$identity->id]->setGroup(
|
$this->_options[$identity->id]->setGroup(
|
||||||
$this->_options[0]
|
$this->_options[
|
||||||
|
Auth\Option\Identity::ID_CRT_NEW
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->_options[$identity->id]->setLabel(
|
$this->_options[$identity->id]->setLabel(
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ class Identity
|
||||||
public const LABEL_NO_NAME = '#%d (no name)';
|
public const LABEL_NO_NAME = '#%d (no name)';
|
||||||
public const LABEL_CRT_NEW = 'Create new for this resource';
|
public const LABEL_CRT_NEW = 'Create new for this resource';
|
||||||
|
|
||||||
|
public const ID_CRT_NEW = 0; // free < 0 > reserved by DB
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Auth $auth
|
Auth $auth
|
||||||
) {
|
) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue