fix: cannot delete resource when you are not on root team
This commit is contained in:
parent
9dfde11e35
commit
c0940f7a19
1 changed files with 1 additions and 1 deletions
|
|
@ -736,7 +736,7 @@ export async function deleteApplication(
|
|||
where: { id },
|
||||
include: { destinationDocker: true, teams: true }
|
||||
});
|
||||
if (teamId !== '0' || !application.teams.some((team) => team.id === teamId)) {
|
||||
if (teamId !== '0' && !application.teams.some((team) => team.id === teamId)) {
|
||||
throw { status: 403, message: 'You are not allowed to delete this application.' };
|
||||
}
|
||||
if (application?.destinationDocker?.id && application.destinationDocker?.network) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue