mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Tweak required roles (#630)
- Ref: https://github.com/inventree/InvenTree/pull/9506
This commit is contained in:
parent
e11382b3b4
commit
5ec86c4ade
3 changed files with 3 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ class InvenTreePartCategory extends InvenTreeModel {
|
||||||
static const String MODEL_TYPE = "partcategory";
|
static const String MODEL_TYPE = "partcategory";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<String> get rolesRequired => ["part_category"];
|
List<String> get rolesRequired => ["part"];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, Map<String, dynamic>> formFields() {
|
Map<String, Map<String, dynamic>> formFields() {
|
||||||
|
|
|
||||||
|
|
@ -644,7 +644,7 @@ class InvenTreeStockLocation extends InvenTreeModel {
|
||||||
static const String MODEL_TYPE = "stocklocation";
|
static const String MODEL_TYPE = "stocklocation";
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<String> get rolesRequired => ["stock_location"];
|
List<String> get rolesRequired => ["stock"];
|
||||||
|
|
||||||
String get pathstring => getString("pathstring");
|
String get pathstring => getString("pathstring");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ void main() {
|
||||||
|
|
||||||
// Check available permissions
|
// Check available permissions
|
||||||
assert(api.checkRole("part", "change"));
|
assert(api.checkRole("part", "change"));
|
||||||
assert(api.checkRole("stock_location", "delete"));
|
assert(api.checkRole("stock", "delete"));
|
||||||
assert(!api.checkRole("part", "weirdpermission"));
|
assert(!api.checkRole("part", "weirdpermission"));
|
||||||
assert(api.checkRole("blah", "bloo"));
|
assert(api.checkRole("blah", "bloo"));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue