Enforce user-specific data access for all users
Refactored controllers and models to always filter data by user ID, removing admin bypass logic. This ensures all statistics, groups, domains, and tags are user-specific regardless of isolation mode, improving data isolation and security.
This commit is contained in:
@@ -24,12 +24,8 @@ class NotificationGroupController extends Controller
|
||||
$settingModel = new \App\Models\Setting();
|
||||
$isolationMode = $settingModel->getValue('user_isolation_mode', 'shared');
|
||||
|
||||
// Get groups based on isolation mode
|
||||
if ($isolationMode === 'isolated') {
|
||||
$groups = $this->groupModel->getAllWithChannelCount($userId);
|
||||
} else {
|
||||
$groups = $this->groupModel->getAllWithChannelCount();
|
||||
}
|
||||
// Get groups (always user-specific)
|
||||
$groups = $this->groupModel->getAllWithChannelCount($userId);
|
||||
|
||||
// Get users for transfer functionality (admin only)
|
||||
$users = [];
|
||||
|
||||
Reference in New Issue
Block a user