Skip to content

Commit

Permalink
remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l committed Jan 16, 2025
1 parent 354a496 commit 7411b87
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/services/api/src/modules/token/providers/token-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,6 @@ export class TokenManager {
throw new HiveError('User is not a member of the organization');
}

// const newScopes = [...input.organizationScopes, ...input.projectScopes, ...input.targetScopes];

// // See what scopes were removed or added
// const modifiedScopes = diffArrays(currentMember.scopes, newScopes);

// // Check if the current user has rights to set these scopes.
// const currentUserMissingScopes = modifiedScopes.filter(
// scope => !currentMember.scopes.includes(scope),
// );

// if (currentUserMissingScopes.length > 0) {
// this.logger.debug(`Logged user scopes: %o`, currentMember.scopes);
// throw new HiveError(`No access to the scopes: ${currentUserMissingScopes.join(', ')}`);
// }

pushIfMissing(scopes, TargetAccessScope.READ);
pushIfMissing(scopes, ProjectAccessScope.READ);
pushIfMissing(scopes, OrganizationAccessScope.READ);
Expand Down

0 comments on commit 7411b87

Please sign in to comment.