2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 13:36:50 +00:00

Catch error when decoding permissions

This commit is contained in:
Oliver 2021-08-09 08:27:29 +10:00
parent 8f02092731
commit 3e2b4454dd

View File

@ -434,9 +434,13 @@ class InvenTreeAPI {
return true; return true;
} }
try {
List<String> perms = List.from(roles[role]); List<String> perms = List.from(roles[role]);
return perms.contains(permission); return perms.contains(permission);
} catch (error, stackTrace) {
sentryReportError(error, stackTrace);
return true;
}
} }