dev #1731
|
@ -1,7 +1,7 @@
|
|||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('activeWithInheritedRole', {
|
||||
description: 'Returns active workers with a role',
|
||||
description: 'Returns active workers with an inherited role',
|
||||
accessType: 'READ',
|
||||
accepts: [{
|
||||
arg: 'filter',
|
||||
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
|||
`SELECT DISTINCT w.id, w.firstName, w.lastName, u.name, u.nickname
|
||||
FROM worker w
|
||||
JOIN account.user u ON u.id = w.userFk
|
||||
JOIN account.roleRole i ON i.role = u.role
|
||||
JOIN account.roleRole i ON i.role = u.role
|
||||
JOIN account.role r ON r.id = i.inheritsFrom`;
|
||||
|
||||
return Self.activeWorkers(query, filter);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
module.exports = Self => {
|
||||
Self.remoteMethod('activeWithRole', {
|
||||
description: 'Returns active workers with an inherited role',
|
||||
description: 'Returns active workers with a role',
|
||||
accessType: 'READ',
|
||||
accepts: [{
|
||||
arg: 'filter',
|
||||
|
|
Loading…
Reference in New Issue