Refactor authorization checks to use 'permissions' instead of 'profile' in multiple files
- Updated authorization checks in product management, product attributes, configurations, software, and user management files to use 'permissions' for consistency. - Ensured that all relevant pages correctly check user permissions for read, update, delete, and create actions. - Adjusted session variable references to align with the new permissions structure across various modules.
This commit is contained in:
@@ -48,7 +48,6 @@ if (debug && debug_id == $_SESSION['authorization']['id']){
|
||||
error_reporting(E_ALL);
|
||||
}
|
||||
|
||||
var_dump($_SESSION['authorization']);
|
||||
//=====================================
|
||||
//TRANSLATION FILE LOCATION
|
||||
//=====================================
|
||||
@@ -110,7 +109,7 @@ if (isset($_GET['page']) && $_GET['page'] == 'logout') {
|
||||
//=====================================
|
||||
//DEFINE WHERE TO SEND THE USER TO. GET first assigned view in the profile if not available use dashboard
|
||||
//=====================================
|
||||
$allowed_views = explode(',',$_SESSION['authorization']['profile']);
|
||||
$allowed_views = explode(',',$_SESSION['authorization']['permissions']);
|
||||
$ignoreViews = ['profile','assets','sales'];
|
||||
|
||||
// If dashboard is in the profile, prioritize it
|
||||
|
||||
Reference in New Issue
Block a user