diff --git a/lib/inventree/part.dart b/lib/inventree/part.dart index 29fa99ea..3070c85f 100644 --- a/lib/inventree/part.dart +++ b/lib/inventree/part.dart @@ -27,7 +27,7 @@ class InvenTreePartCategory extends InvenTreeModel { static const String MODEL_TYPE = "partcategory"; @override - List get rolesRequired => ["part_category"]; + List get rolesRequired => ["part"]; @override Map> formFields() { diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart index baa328a9..3f8ca972 100644 --- a/lib/inventree/stock.dart +++ b/lib/inventree/stock.dart @@ -644,7 +644,7 @@ class InvenTreeStockLocation extends InvenTreeModel { static const String MODEL_TYPE = "stocklocation"; @override - List get rolesRequired => ["stock_location"]; + List get rolesRequired => ["stock"]; String get pathstring => getString("pathstring"); diff --git a/test/api_test.dart b/test/api_test.dart index 2a6145f5..6b2554fa 100644 --- a/test/api_test.dart +++ b/test/api_test.dart @@ -118,7 +118,7 @@ void main() { // Check available permissions assert(api.checkRole("part", "change")); - assert(api.checkRole("stock_location", "delete")); + assert(api.checkRole("stock", "delete")); assert(!api.checkRole("part", "weirdpermission")); assert(api.checkRole("blah", "bloo"));