Respect user isolation mode in controllers
Updated DashboardController, DomainController, and NotificationGroupController to conditionally fetch user-specific or global data based on the 'user_isolation_mode' setting. This ensures that data visibility aligns with the configured isolation mode, improving multi-user support and data segregation.
This commit is contained in:
@@ -24,8 +24,12 @@ class NotificationGroupController extends Controller
|
||||
$settingModel = new \App\Models\Setting();
|
||||
$isolationMode = $settingModel->getValue('user_isolation_mode', 'shared');
|
||||
|
||||
// Get groups (always user-specific)
|
||||
$groups = $this->groupModel->getAllWithChannelCount($userId);
|
||||
// Get groups based on isolation mode
|
||||
if ($isolationMode === 'isolated') {
|
||||
$groups = $this->groupModel->getAllWithChannelCount($userId);
|
||||
} else {
|
||||
$groups = $this->groupModel->getAllWithChannelCount();
|
||||
}
|
||||
|
||||
// Get users for transfer functionality (admin only)
|
||||
$users = [];
|
||||
|
||||
Reference in New Issue
Block a user