1
0

Merge branch 'main' into task/main/DURACOM-288

# Conflicts:
#	src/environments/environment.production.ts
#	src/environments/environment.test.ts
#	src/environments/environment.ts
This commit is contained in:
Giuseppe Digilio
2025-02-03 15:12:25 +01:00
5 changed files with 18 additions and 4 deletions

View File

@@ -27,7 +27,9 @@ ssr:
# disabled (false) by default to boost server performance at the expense of loading smoothness. # disabled (false) by default to boost server performance at the expense of loading smoothness.
inlineCriticalCss: false inlineCriticalCss: false
# Path prefixes to enable SSR for. By default these are limited to paths of primary DSpace objects. # Path prefixes to enable SSR for. By default these are limited to paths of primary DSpace objects.
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ] # NOTE: The "/handle/" path ensures Handle redirects work via SSR. The "/reload/" path ensures
# hard refreshes (e.g. after login) trigger SSR while fully reloading the page.
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ]
# Whether to enable rendering of Search component on SSR. # Whether to enable rendering of Search component on SSR.
# If set to true the component will be included in the HTML returned from the server side rendering. # If set to true the component will be included in the HTML returned from the server side rendering.
# If set to false the component will not be included in the HTML returned from the server side rendering. # If set to false the component will not be included in the HTML returned from the server side rendering.

View File

@@ -129,12 +129,24 @@ export class AuthInterceptor implements HttpInterceptor {
*/ */
private sortAuthMethods(authMethodModels: AuthMethod[]): AuthMethod[] { private sortAuthMethods(authMethodModels: AuthMethod[]): AuthMethod[] {
const sortedAuthMethodModels: AuthMethod[] = []; const sortedAuthMethodModels: AuthMethod[] = [];
let passwordAuthFound = false;
let ldapAuthFound = false;
authMethodModels.forEach((method) => { authMethodModels.forEach((method) => {
if (method.authMethodType === AuthMethodType.Password) { if (method.authMethodType === AuthMethodType.Password) {
sortedAuthMethodModels.push(method); sortedAuthMethodModels.push(method);
passwordAuthFound = true;
}
if (method.authMethodType === AuthMethodType.Ldap) {
ldapAuthFound = true;
} }
}); });
// Using password authentication method to provide UI for LDAP authentication even if password auth is not present in server
if (ldapAuthFound && !(passwordAuthFound)) {
sortedAuthMethodModels.push(new AuthMethod(AuthMethodType.Password,0));
}
authMethodModels.forEach((method) => { authMethodModels.forEach((method) => {
if (method.authMethodType !== AuthMethodType.Password) { if (method.authMethodType !== AuthMethodType.Password) {
sortedAuthMethodModels.push(method); sortedAuthMethodModels.push(method);

View File

@@ -10,7 +10,7 @@ export const environment: Partial<BuildConfig> = {
inlineCriticalCss: false, inlineCriticalCss: false,
transferState: true, transferState: true,
replaceRestUrl: true, replaceRestUrl: true,
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ], paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ],
enableSearchComponent: false, enableSearchComponent: false,
enableBrowseComponent: false, enableBrowseComponent: false,
}, },

View File

@@ -14,7 +14,7 @@ export const environment: BuildConfig = {
inlineCriticalCss: false, inlineCriticalCss: false,
transferState: true, transferState: true,
replaceRestUrl: false, replaceRestUrl: false,
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ], paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ],
enableSearchComponent: false, enableSearchComponent: false,
enableBrowseComponent: false, enableBrowseComponent: false,
}, },

View File

@@ -15,7 +15,7 @@ export const environment: Partial<BuildConfig> = {
inlineCriticalCss: false, inlineCriticalCss: false,
transferState: true, transferState: true,
replaceRestUrl: false, replaceRestUrl: false,
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ], paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ],
enableSearchComponent: false, enableSearchComponent: false,
enableBrowseComponent: false, enableBrowseComponent: false,
}, },