Merge remote-tracking branch 'chamomind/develop' into develop
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 5s
This commit is contained in:
commit
5536331984
2 changed files with 23 additions and 3 deletions
|
|
@ -32,6 +32,7 @@ import { notFoundError } from "../utils/error";
|
|||
import { deleteFile, fileLocation, getFile, getPresigned, listFile, setFile } from "../utils/minio";
|
||||
import HttpError from "../interfaces/http-error";
|
||||
import HttpStatus from "../interfaces/http-status";
|
||||
import { getGroupUser } from "../services/keycloak";
|
||||
|
||||
// User in company can edit.
|
||||
const permissionCheck = createPermCheck((_) => true);
|
||||
|
|
@ -136,9 +137,24 @@ export class RequestDataController extends Controller {
|
|||
workflow: {
|
||||
step: {
|
||||
some: {
|
||||
responsiblePerson: {
|
||||
some: { userId: req.user.sub },
|
||||
},
|
||||
OR: [
|
||||
{
|
||||
responsiblePerson: {
|
||||
some: { userId: req.user.sub },
|
||||
},
|
||||
},
|
||||
{
|
||||
responsibleGroup: {
|
||||
some: {
|
||||
group: {
|
||||
in: await getGroupUser(req.user.sub).then((r) =>
|
||||
r.map(({ name }: { name: string }) => name),
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -174,6 +190,7 @@ export class RequestDataController extends Controller {
|
|||
include: { user: true },
|
||||
},
|
||||
responsibleInstitution: true,
|
||||
responsibleGroup: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -789,6 +806,7 @@ export class RequestListController extends Controller {
|
|||
include: { user: true },
|
||||
},
|
||||
responsibleInstitution: true,
|
||||
responsibleGroup: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
@ -849,6 +867,7 @@ export class RequestListController extends Controller {
|
|||
include: { user: true },
|
||||
},
|
||||
responsibleInstitution: true,
|
||||
responsibleGroup: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ export class TaskController extends Controller {
|
|||
step: {
|
||||
include: {
|
||||
value: true,
|
||||
responsibleGroup: true,
|
||||
responsiblePerson: {
|
||||
include: { user: true },
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue