Skip to content

Commit 5490d54

Browse files
Tweak required roles
- Ref: inventree/InvenTree#9506
1 parent e11382b commit 5490d54

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/inventree/part.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class InvenTreePartCategory extends InvenTreeModel {
2727
static const String MODEL_TYPE = "partcategory";
2828

2929
@override
30-
List<String> get rolesRequired => ["part_category"];
30+
List<String> get rolesRequired => ["part"];
3131

3232
@override
3333
Map<String, Map<String, dynamic>> formFields() {

lib/inventree/stock.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ class InvenTreeStockLocation extends InvenTreeModel {
644644
static const String MODEL_TYPE = "stocklocation";
645645

646646
@override
647-
List<String> get rolesRequired => ["stock_location"];
647+
List<String> get rolesRequired => ["stock"];
648648

649649
String get pathstring => getString("pathstring");
650650

test/api_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void main() {
118118

119119
// Check available permissions
120120
assert(api.checkRole("part", "change"));
121-
assert(api.checkRole("stock_location", "delete"));
121+
assert(api.checkRole("stock", "delete"));
122122
assert(!api.checkRole("part", "weirdpermission"));
123123
assert(api.checkRole("blah", "bloo"));
124124

0 commit comments

Comments
 (0)