Skip to content

Commit

Permalink
Merge branch 'master' into openapi-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrosx authored Mar 21, 2024
2 parents f990459 + 4e32b87 commit e6d224c
Show file tree
Hide file tree
Showing 40 changed files with 247 additions and 170 deletions.
4 changes: 2 additions & 2 deletions CI/E2E/config.e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"editDatasetSampleEnabled": true,
"editMetadataEnabled": true,
"editPublishedData": false,
"editSampleEnabled": true,
"addSampleEnabled": true,
"externalAuthEndpoint": "/api/v3/auth/msad",
"facility": "ESS",
"loginFacilityLabel": "ESS",
Expand Down Expand Up @@ -119,4 +119,4 @@
"shoppingCartEnabled": true,
"shoppingCartOnHeader": true,
"tableSciDataEnabled": true
}
}
4 changes: 2 additions & 2 deletions CI/E2E/frontend.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"editDatasetSampleEnabled": true,
"editMetadataEnabled": true,
"editPublishedData": false,
"editSampleEnabled": true,
"addSampleEnabled": true,
"externalAuthEndpoint": "/api/v3/auth/msad",
"facility": "ESS",
"loginFacilityLabel": "ESS",
Expand Down Expand Up @@ -36,7 +36,7 @@
"order": 1,
"type": "standard",
"enabled": true
},
},
{
"name": "datasetName",
"order": 2,
Expand Down
6 changes: 2 additions & 4 deletions CI/MLZ/frontend.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"externalAuthEndpoint": "/auth/ldap",
"editMetadataEnabled": true,
"editSampleEnabled": true,
"addSampleEnabled": true,
"editPublishedData": true,
"scienceSearchEnabled": true,
"facility": "MLZ",
Expand Down Expand Up @@ -118,7 +118,5 @@
"scienceSearchUnitsEnabled": false,
"metadataStructure": "",
"loginFormEnabled": true,
"oAuth2Endpoints": [
{"displayText": "MLZ", "authURL":"api/v3/auth/oidc"}
]
"oAuth2Endpoints": [{ "displayText": "MLZ", "authURL": "api/v3/auth/oidc" }]
}
43 changes: 22 additions & 21 deletions CI/MLZ/frontend.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ export default {
retrieveDestinations: [
{
option: "MLZ",
location: "/home/out"
location: "/home/out",
},
{
option: "MLZ S3 (Testphase)"
}
option: "MLZ S3 (Testphase)",
},
],
accessTokenPrefix: "Bearer ",
lbTokenPrefix: "Bearer ",
externalAuthEndpoint: "",
editMetadataEnabled: true,
editSampleEnabled: true,
addSampleEnabled: true,
editPublishedData: true,
scienceSearchEnabled: true,
facility: "MLZ",
Expand All @@ -33,74 +33,74 @@ export default {
name: "select",
order: 0,
type: "standard",
enabled: true
enabled: true,
},
{
name: "datasetName",
order: 1,
type: "standard",
enabled: true
enabled: true,
},
{
name: "runNumber",
order: 2,
type: "standard",
enabled: true
enabled: true,
},
{
name: "sourceFolder",
order: 3,
type: "standard",
enabled: true
enabled: true,
},
{
name: "size",
order: 4,
type: "standard",
enabled: true
enabled: true,
},
{
name: "creationTime",
order: 5,
type: "standard",
enabled: true
enabled: true,
},
{
name: "type",
order: 6,
type: "standard",
enabled: true
enabled: true,
},
{
name: "image",
order: 7,
type: "standard",
enabled: true
enabled: true,
},
{
name: "metadata",
order: 8,
type: "standard",
enabled: true
enabled: true,
},
{
name: "proposalId",
order: 9,
type: "standard",
enabled: true
enabled: true,
},
{
name: "ownerGroup",
order: 10,
type: "standard",
enabled: true
enabled: true,
},
{
name: "dataStatus",
order: 11,
type: "standard",
enabled: true
}
enabled: true,
},
],
logbookEnabled: true,
metadataPreviewEnabled: true,
Expand All @@ -121,8 +121,9 @@ export default {
metadataStructure: "",
loginFormEnabled: true,
oAuth2Endpoints: [
{
displayText: "MLZ",
authURL: "api/v3/auth/oidc"}
]
{
displayText: "MLZ",
authURL: "api/v3/auth/oidc",
},
],
};
76 changes: 38 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/attachments/attachments.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const mockAttachment: Attachment = {

describe("AttachmentsService", () => {
let service: AttachmentsService;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
let attachmentModel: Model<Attachment>;

beforeEach(async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Injectable, Logger } from "@nestjs/common";
import { Injectable } from "@nestjs/common";
import { UserPayload } from "../interfaces/userPayload.interface";
import { AccessGroupService } from "./access-group.service";

Expand All @@ -11,10 +11,7 @@ export class AccessGroupFromMultipleProvidersService extends AccessGroupService
super();
}

async getAccessGroups(
//idpPayload: Record<string, unknown>,
userPayload: UserPayload,
): Promise<string[]> {
async getAccessGroups(userPayload: UserPayload): Promise<string[]> {
const accessGroups: string[] = [];

for (const accessGroupProvider of this.accessGroupProviders) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Injectable, Logger } from "@nestjs/common";
import { Injectable } from "@nestjs/common";
import { AccessGroupService } from "./access-group.service";

/**
Expand All @@ -11,10 +11,6 @@ export class AccessGroupFromStaticValuesService extends AccessGroupService {
}

async getAccessGroups(): Promise<string[]> {
// Logger.log(
// "Static access group getAccessGroups : " +
// this.staticAccessGroups.join(","),
// );
return this.staticAccessGroups;
}
}
6 changes: 3 additions & 3 deletions src/auth/auth.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { AuthService } from "./auth.service";
import { ConfigService } from "@nestjs/config";

class AuthServiceMock {
login(req: Record<string, unknown>) {
login() {
return { username: "Test User", email: "[email protected]" };
}

adLogin(req: Record<string, unknown>) {
adLogin() {
return { username: "Test User", email: "[email protected]" };
}

whoami(req: Record<string, unknown>) {
whoami() {
return { username: "Test User", email: "[email protected]" };
}
}
Expand Down
Loading

0 comments on commit e6d224c

Please sign in to comment.