2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-27 04:56:48 +00:00

Tweak required roles (#630)

- Ref: https://github.com/inventree/InvenTree/pull/9506
This commit is contained in:
Oliver 2025-04-15 15:45:03 +10:00 committed by GitHub
parent e11382b3b4
commit 5ec86c4ade
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ class InvenTreePartCategory extends InvenTreeModel {
static const String MODEL_TYPE = "partcategory";
@override
List<String> get rolesRequired => ["part_category"];
List<String> get rolesRequired => ["part"];
@override
Map<String, Map<String, dynamic>> formFields() {

View File

@ -644,7 +644,7 @@ class InvenTreeStockLocation extends InvenTreeModel {
static const String MODEL_TYPE = "stocklocation";
@override
List<String> get rolesRequired => ["stock_location"];
List<String> get rolesRequired => ["stock"];
String get pathstring => getString("pathstring");

View File

@ -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"));