fix: refs #5919 get locker by relation
This commit is contained in:
parent
035782414f
commit
7f4965879c
|
@ -3,5 +3,4 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri
|
|||
('Locker', '*', '*', 'ALLOW', 'ROLE', 'hr'),
|
||||
('Locker', '*', '*', 'ALLOW', 'ROLE', 'productionBoss'),
|
||||
('Worker', '__get__locker', 'READ', 'ALLOW', 'ROLE', 'hr'),
|
||||
('Worker', '__get__locker', 'READ', 'ALLOW', 'ROLE', 'productionBoss'),
|
||||
('Worker', '__get__locker', 'READ', 'ALLOW', 'ROLE', 'productionBoss');
|
||||
|
|
|
@ -15,13 +15,6 @@
|
|||
"type": "string"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "VnUser",
|
||||
"foreignKey": "workerFk"
|
||||
}
|
||||
},
|
||||
"scopes": {
|
||||
"codes": {
|
||||
"fields": ["id","code"]
|
||||
|
|
|
@ -101,15 +101,6 @@
|
|||
"foreignKey": "workerFk"
|
||||
}
|
||||
},
|
||||
"scopes":{
|
||||
"locker": {
|
||||
"fields":["id","sex"],
|
||||
"include": {
|
||||
"relation": "locker",
|
||||
"scope": {"fields": ["id", "code"]}
|
||||
}
|
||||
}
|
||||
},
|
||||
"acls":[
|
||||
{
|
||||
"property": "__get__locker",
|
||||
|
|
Loading…
Reference in New Issue