|
|
@ -162,7 +162,7 @@ class CustomDrawer extends StatelessWidget { |
|
|
leading: const Icon(Icons.warning_amber), |
|
|
leading: const Icon(Icons.warning_amber), |
|
|
title: const Text("Gérer les rôles"), |
|
|
title: const Text("Gérer les rôles"), |
|
|
onTap: () async { |
|
|
onTap: () async { |
|
|
bool hasPermission = await userController.hasAnyPermission(['update', 'delete']); |
|
|
bool hasPermission = await userController.hasAnyPermission(['update', 'delete','create']); |
|
|
if (hasPermission) { |
|
|
if (hasPermission) { |
|
|
Get.to(const HandleUserRole()); |
|
|
Get.to(const HandleUserRole()); |
|
|
} else { |
|
|
} else { |
|
|
|