chore: address ESLint errors

This commit is contained in:
Danny Avila 2025-06-19 21:58:45 -04:00
parent 5512c55d71
commit f8c8b89f4d
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
6 changed files with 86 additions and 60 deletions

View file

@ -188,7 +188,10 @@ const getUserOwnedEntraGroups = async (accessToken, sub) => {
try {
const graphClient = await createGraphClient(accessToken, sub);
const groupsResponse = await graphClient.api('/me/ownedObjects/microsoft.graph.group').select('id').get();
const groupsResponse = await graphClient
.api('/me/ownedObjects/microsoft.graph.group')
.select('id')
.get();
return (groupsResponse.value || []).map((group) => group.id);
} catch (error) {

View file

@ -60,7 +60,7 @@ describe('GraphApiService', () => {
beforeEach(async () => {
jest.clearAllMocks();
await mongoose.connection.dropDatabase();
// Set up environment variable for People.Read scope
process.env.OPENID_GRAPH_SCOPES = 'User.Read,People.Read,Group.Read.All';

View file

@ -484,7 +484,7 @@ const hasPublicPermission = async ({ resourceType, resourceId, requiredPermissio
// Use public principal to check permissions
const publicPrincipal = [{ principalType: 'public' }];
const entries = await findEntriesByPrincipalsAndResource(
publicPrincipal,
resourceType,
@ -492,7 +492,7 @@ const hasPublicPermission = async ({ resourceType, resourceId, requiredPermissio
);
// Check if any entry has the required permission bits
return entries.some(entry => (entry.permBits & requiredPermissions) === requiredPermissions);
return entries.some((entry) => (entry.permBits & requiredPermissions) === requiredPermissions);
} catch (error) {
logger.error(`[PermissionService.hasPublicPermission] Error: ${error.message}`);
// Re-throw validation errors