diff --git a/.idea/php.xml b/.idea/php.xml
index 75575c56..7f6d3f29 100755
--- a/.idea/php.xml
+++ b/.idea/php.xml
@@ -63,6 +63,11 @@
+
+
+
+
+
diff --git a/ci4/app/Config/Auth.php b/ci4/app/Config/Auth.php
index a373b4c0..c917571c 100644
--- a/ci4/app/Config/Auth.php
+++ b/ci4/app/Config/Auth.php
@@ -13,19 +13,19 @@ declare(strict_types=1);
namespace Config;
+use App\Models\UserModel;
+use CodeIgniter\Shield\Authentication\Passwords\ValidationRules;
use CodeIgniter\Shield\Config\Auth as ShieldAuth;
use CodeIgniter\Shield\Authentication\Actions\ActionInterface;
use CodeIgniter\Shield\Authentication\AuthenticatorInterface;
use CodeIgniter\Shield\Authentication\Authenticators\AccessTokens;
use CodeIgniter\Shield\Authentication\Authenticators\HmacSha256;
-use CodeIgniter\Shield\Authentication\Authenticators\JWT;
use CodeIgniter\Shield\Authentication\Authenticators\Session;
use CodeIgniter\Shield\Authentication\Passwords\CompositionValidator;
use CodeIgniter\Shield\Authentication\Passwords\DictionaryValidator;
use CodeIgniter\Shield\Authentication\Passwords\NothingPersonalValidator;
use CodeIgniter\Shield\Authentication\Passwords\PwnedValidator;
use CodeIgniter\Shield\Authentication\Passwords\ValidatorInterface;
-use CodeIgniter\Shield\Models\UserModel;
class Auth extends ShieldAuth
{
@@ -269,7 +269,7 @@ class Auth extends ShieldAuth
public array $passwordValidators = [
CompositionValidator::class,
NothingPersonalValidator::class,
- DictionaryValidator::class,
+ DictionaryValidator::class
// PwnedValidator::class,
];
diff --git a/ci4/app/Config/Autoload.php b/ci4/app/Config/Autoload.php
index e874357d..dbe37194 100755
--- a/ci4/app/Config/Autoload.php
+++ b/ci4/app/Config/Autoload.php
@@ -13,7 +13,12 @@ use CodeIgniter\Config\AutoloadConfig;
* can find the files as needed.
*
* NOTE: If you use an identical key in $psr4 or $classmap, then
- * the values in this file will overwrite the framework's values.
+ * the values in this file will overwrite the framework's values.
+ *
+ * NOTE: This class is required prior to Autoloader instantiation,
+ * and does not extend BaseConfig.
+ *
+ * @immutable
*/
class Autoload extends AutoloadConfig
{
@@ -31,14 +36,12 @@ class Autoload extends AutoloadConfig
* else you will need to modify all of those classes for this to work.
*
* Prototype:
- *```
* $psr4 = [
* 'CodeIgniter' => SYSTEMPATH,
- * 'App' => APPPATH
+ * 'App' => APPPATH
* ];
- *```
*
- * @var array
+ * @var array|string>
*/
public $psr4 = [
APP_NAMESPACE => APPPATH, // For custom app namespace
@@ -57,11 +60,9 @@ class Autoload extends AutoloadConfig
* were being autoloaded through a namespace.
*
* Prototype:
- *```
* $classmap = [
* 'MyClass' => '/path/to/class/file.php'
* ];
- *```
*
* @var array
*/
@@ -76,13 +77,11 @@ class Autoload extends AutoloadConfig
* or for loading functions.
*
* Prototype:
- * ```
- * $files = [
- * '/path/to/my/file.php',
- * ];
- * ```
+ * $files = [
+ * '/path/to/my/file.php',
+ * ];
*
- * @var array
+ * @var list
*/
public $files = [];
diff --git a/ci4/app/Config/Boot/development.php b/ci4/app/Config/Boot/development.php
index 05a86125..a868447a 100755
--- a/ci4/app/Config/Boot/development.php
+++ b/ci4/app/Config/Boot/development.php
@@ -7,8 +7,10 @@
| In development, we want to show as many errors as possible to help
| make sure they don't make it to production. And save us hours of
| painful debugging.
+ |
+ | If you set 'display_errors' to '1', CI4's detailed error report will show.
*/
-error_reporting(-1);
+error_reporting(E_ALL);
ini_set('display_errors', '1');
/*
diff --git a/ci4/app/Config/Boot/production.php b/ci4/app/Config/Boot/production.php
index 21d25805..73c7c60a 100755
--- a/ci4/app/Config/Boot/production.php
+++ b/ci4/app/Config/Boot/production.php
@@ -6,6 +6,8 @@
|--------------------------------------------------------------------------
| Don't show ANY in production environments. Instead, let the system catch
| it and display a generic error message.
+ |
+ | If you set 'display_errors' to '1', CI4's detailed error report will show.
*/
ini_set('display_errors', '0');
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
diff --git a/ci4/app/Config/Boot/testing.php b/ci4/app/Config/Boot/testing.php
index e07a1d43..40b6ca83 100755
--- a/ci4/app/Config/Boot/testing.php
+++ b/ci4/app/Config/Boot/testing.php
@@ -1,5 +1,11 @@
*/
- public $templates = [
+ public array $templates = [
'list' => 'CodeIgniter\Validation\Views\list',
'single' => 'CodeIgniter\Validation\Views\single',
'bootstrap_style' => 'themes/_commonPartialsBs/_form_validation_errors',
@@ -43,4 +45,38 @@ class Validation
//--------------------------------------------------------------------
// Rules
//--------------------------------------------------------------------
+ //--------------------------------------------------------------------
+ // Rules For Login
+ //--------------------------------------------------------------------
+ /*public $login = [
+ // 'username' => [
+ // 'label' => 'Auth.username',
+ // 'rules' => [
+ // 'required',
+ // 'max_length[30]',
+ // 'min_length[3]',
+ // 'regex_match[/\A[a-zA-Z0-9\.]+\z/]',
+ // ],
+ // ],
+ 'email' => [
+ 'label' => 'Auth.email',
+ 'rules' => [
+ 'required',
+ 'max_length[254]',
+ 'valid_email'
+ ],
+ ],
+ 'password' => [
+ 'label' => 'Auth.password',
+ 'rules' => [
+ 'required',
+ 'max_byte[72]',
+ ],
+ 'errors' => [
+ 'max_byte' => 'Auth.errorPasswordTooLongBytes',
+ ]
+ ],
+ ];*/
+
+
}
diff --git a/ci4/app/UserModel.php b/ci4/app/Models/UserModel.php
similarity index 100%
rename from ci4/app/UserModel.php
rename to ci4/app/Models/UserModel.php
diff --git a/ci4/app/Validation/ApiAuthRules.php b/ci4/app/Validation/ApiAuthRules.php
deleted file mode 100755
index 4ef2f8c6..00000000
--- a/ci4/app/Validation/ApiAuthRules.php
+++ /dev/null
@@ -1,36 +0,0 @@
-where('email',$data['email'])->first();
- $phpass = new PasswordHash(8, true);
- return $phpass->CheckPassword($data['password']??'', $obj['password']);
- } catch (Exception $e) {
- return false;
- }
- }
-
- public function validateAuthPermission(string $str, string $fields, array $data): bool
- {
- try {
- $user_model = new UserModel();
- $settings_model = new SettingsModel();
- $settings = $settings_model->first()??[];
- $obj = $user_model->where('email',$data['email'])->first();
- return $settings['group_api'] == $obj['group'];
- } catch (Exception $e) {
- return false;
- }
- }
-}
\ No newline at end of file
diff --git a/ci4/app/Views/themes/backend/vuexy/main/activities_layout.php b/ci4/app/Views/themes/backend/vuexy/main/activities_layout.php
index a3d7e3af..65947479 100755
--- a/ci4/app/Views/themes/backend/vuexy/main/activities_layout.php
+++ b/ci4/app/Views/themes/backend/vuexy/main/activities_layout.php
@@ -269,7 +269,7 @@ if (!empty($token) && $tfa == false) {
- ">
+ ">
= lang("App.menu_logout") ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/main/all.php b/ci4/app/Views/themes/backend/vuexy/main/all.php
index 2507fa7a..b15d5276 100755
--- a/ci4/app/Views/themes/backend/vuexy/main/all.php
+++ b/ci4/app/Views/themes/backend/vuexy/main/all.php
@@ -502,7 +502,7 @@ if (!empty($token) && $tfa == false) {
- ">
+ ">
= lang("App.menu_logout") ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/main/defaultlayout.php b/ci4/app/Views/themes/backend/vuexy/main/defaultlayout.php
index 332be9cd..30c4154e 100755
--- a/ci4/app/Views/themes/backend/vuexy/main/defaultlayout.php
+++ b/ci4/app/Views/themes/backend/vuexy/main/defaultlayout.php
@@ -267,7 +267,7 @@ if (!empty($token) && $tfa == false) {
- ">
+ ">
= lang("App.menu_logout") ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/main/demo_view.php b/ci4/app/Views/themes/backend/vuexy/main/demo_view.php
index 5efa5c48..b7dc615e 100755
--- a/ci4/app/Views/themes/backend/vuexy/main/demo_view.php
+++ b/ci4/app/Views/themes/backend/vuexy/main/demo_view.php
@@ -204,7 +204,7 @@ if (!empty($token) && $tfa == false) {
- ">
+ ">
= lang("App.menu_logout") ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/main/general_settings_layout.php b/ci4/app/Views/themes/backend/vuexy/main/general_settings_layout.php
index 14a6da3f..7b5e21b8 100755
--- a/ci4/app/Views/themes/backend/vuexy/main/general_settings_layout.php
+++ b/ci4/app/Views/themes/backend/vuexy/main/general_settings_layout.php
@@ -272,7 +272,7 @@ if (!empty($token) && $tfa == false) {
- ">
+ ">
= lang("App.menu_logout") ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/main/header.php b/ci4/app/Views/themes/backend/vuexy/main/header.php
index 5edbb201..118d727a 100755
--- a/ci4/app/Views/themes/backend/vuexy/main/header.php
+++ b/ci4/app/Views/themes/backend/vuexy/main/header.php
@@ -174,7 +174,7 @@ if (!empty($token) && $tfa == false) {
= lang("App.menu_activity") ?>
--->
-
+
= lang("App.menu_logout") ?>
diff --git a/ci4/app/Views/themes/backend/vuexy/main/presupuestos_layout.php b/ci4/app/Views/themes/backend/vuexy/main/presupuestos_layout.php
index cbe14703..2223aa0a 100755
--- a/ci4/app/Views/themes/backend/vuexy/main/presupuestos_layout.php
+++ b/ci4/app/Views/themes/backend/vuexy/main/presupuestos_layout.php
@@ -273,7 +273,7 @@ if (!empty($token) && $tfa == false) {
- ">
+ ">
= lang("App.menu_logout") ?>