Skip to content

Commit

Permalink
fix(server): create default group when check miss (#1459)
Browse files Browse the repository at this point in the history
  • Loading branch information
0fatal committed Aug 12, 2023
1 parent 3d7631a commit 3bcd8fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/src/authentication/application.auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export class ApplicationAuthGuard implements CanActivate {
if (!ok && !app.createdBy.equals(user._id)) {
return false
}
if (!ok) {
await this.groupService.create(appid, user._id, appid)
await this.checkGroupAuth(appid, user, context)
}

// inject app to request
request.application = app
Expand Down

0 comments on commit 3bcd8fd

Please sign in to comment.