* Mon Jun 09 2025 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-87.sme
- add datetime getYear_list [SME: 13031] - use esmith::*DB::UTF8 to access db flat files [SME: 13027]
This commit is contained in:
@@ -5,7 +5,7 @@ package SrvMngr_Auth;
|
||||
use strict;
|
||||
use warnings;
|
||||
use Exporter qw(import); # Import the Exporter module
|
||||
use esmith::AccountsDB;
|
||||
use esmith::AccountsDB::UTF8;
|
||||
|
||||
# Define functions to be exported upon request
|
||||
our @EXPORT_OK = qw(check_admin_access load_user_auth_info has_panel_access get_panel_from_path);
|
||||
@@ -42,7 +42,7 @@ sub load_user_auth_info {
|
||||
|
||||
# If not admin, get allowed panels
|
||||
if (!$auth_info{is_admin} && $auth_info{username}) {
|
||||
my $accountsdb = esmith::AccountsDB->open_ro();
|
||||
my $accountsdb = esmith::AccountsDB::UTF8->open_ro();
|
||||
if ($accountsdb) {
|
||||
my $user_rec = $accountsdb->get($auth_info{username});
|
||||
# Check if the property exists before trying to get its value
|
||||
@@ -97,4 +97,4 @@ sub check_admin_access {
|
||||
return has_panel_access($c, $requested_panel);
|
||||
}
|
||||
|
||||
1; # Return true value for module loading
|
||||
1; # Return true value for module loading
|
||||
|
Reference in New Issue
Block a user