mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 21:46:46 +00:00
Catch error when decoding permissions
This commit is contained in:
parent
8f02092731
commit
3e2b4454dd
10
lib/api.dart
10
lib/api.dart
@ -434,9 +434,13 @@ class InvenTreeAPI {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> perms = List.from(roles[role]);
|
try {
|
||||||
|
List<String> perms = List.from(roles[role]);
|
||||||
return perms.contains(permission);
|
return perms.contains(permission);
|
||||||
|
} catch (error, stackTrace) {
|
||||||
|
sentryReportError(error, stackTrace);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user