Skip to content

Commit

Permalink
provide root space agent for sub-sub space
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinyanakiev committed Nov 18, 2024
1 parent 51c8290 commit 67d3888
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/domain/space/space/space.service.license.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ export class SpaceLicenseService {

// Ensure always applying from a clean state
space.license = this.licenseService.reset(space.license);
const rootLevelSpaceAgent = agent ?? space.agent;

space.license = await this.extendLicensePolicy(
space.license,
agent ?? space.agent
rootLevelSpaceAgent
);

updatedLicenses.push(space.license);
Expand All @@ -86,7 +87,7 @@ export class SpaceLicenseService {
for (const subspace of space.subspaces) {
const subspaceLicenses = await this.applyLicensePolicy(
subspace.id,
space.agent
rootLevelSpaceAgent
);
updatedLicenses.push(...subspaceLicenses);
}
Expand Down

0 comments on commit 67d3888

Please sign in to comment.