Skip to content

Commit

Permalink
fix(flp): exit if no identity
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Nov 10, 2023
1 parent 1f3e8a1 commit 7483487
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/api-aco/src/createAcoContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ const setupAcoContext = async (context: AcoContext): Promise<void> => {
getIdentityTeam: async () => {
return security.withoutAuthorization(async () => {
const identity = security.getIdentity();
if (!identity) {
return null;
}

const adminUser = await context.adminUsers.getUser({ where: { id: identity.id } });
if (!adminUser) {
return null;
Expand Down

0 comments on commit 7483487

Please sign in to comment.