feat : role And permission

This commit is contained in:
2025-09-06 14:50:02 +03:30
parent bdf5344451
commit 34609d22a1
34 changed files with 657 additions and 306 deletions

View File

@@ -1,8 +1,19 @@
import 'package:rasadyar_core/core.dart';
class RoleLogic extends GetxController {
TokenStorageService tokenService = Get.find<TokenStorageService>();
GService gService = Get.find<GService>();
RxList<String> roles = <String>[].obs;
@override
void onInit() {
super.onInit();
List<String> items = tokenService.getUserLocal(Module.chicken)!.roles ?? [];
if (items.isNotEmpty ?? false) {
roles.assignAll(items);
}
}
@override
void onReady() {
// TODO: implement onReady