diff --git a/src/Entity/Browser/Container/Page/Auth.php b/src/Entity/Browser/Container/Page/Auth.php index d9da7fef..be017ab8 100644 --- a/src/Entity/Browser/Container/Page/Auth.php +++ b/src/Entity/Browser/Container/Page/Auth.php @@ -72,16 +72,24 @@ class Auth ); // 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->_options[0]->setGroup( - $this->_options[0] + $this->_options[ + Auth\Option\Identity::ID_CRT_NEW + ]->setGroup( + $this->_options[ + Auth\Option\Identity::ID_CRT_NEW + ] ); - $this->_options[0]->setLabel( - 0, null + $this->_options[ + Auth\Option\Identity::ID_CRT_NEW + ]->setLabel( + Auth\Option\Identity::ID_CRT_NEW ); // Search database for auth records @@ -100,7 +108,9 @@ class Auth ); $this->_options[$identity->id]->setGroup( - $this->_options[0] + $this->_options[ + Auth\Option\Identity::ID_CRT_NEW + ] ); $this->_options[$identity->id]->setLabel( diff --git a/src/Entity/Browser/Container/Page/Auth/Option/Identity.php b/src/Entity/Browser/Container/Page/Auth/Option/Identity.php index a550c506..2b4ce7ba 100644 --- a/src/Entity/Browser/Container/Page/Auth/Option/Identity.php +++ b/src/Entity/Browser/Container/Page/Auth/Option/Identity.php @@ -27,6 +27,8 @@ class Identity public const LABEL_NO_NAME = '#%d (no name)'; public const LABEL_CRT_NEW = 'Create new for this resource'; + public const ID_CRT_NEW = 0; // free < 0 > reserved by DB + public function __construct( Auth $auth ) {