Skip to content

Commit 7acf793

Browse files
committed
Merge branch 'main' into task/main/DURACOM-288
# Conflicts: # src/environments/environment.production.ts # src/environments/environment.test.ts # src/environments/environment.ts
2 parents ac3e87d + 073cd07 commit 7acf793

5 files changed

Lines changed: 18 additions & 4 deletions

File tree

config/config.example.yml

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

src/app/core/auth/auth.interceptor.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,24 @@ export class AuthInterceptor implements HttpInterceptor {
129129
*/
130130
private sortAuthMethods(authMethodModels: AuthMethod[]): AuthMethod[] {
131131
const sortedAuthMethodModels: AuthMethod[] = [];
132+
let passwordAuthFound = false;
133+
let ldapAuthFound = false;
134+
132135
authMethodModels.forEach((method) => {
133136
if (method.authMethodType === AuthMethodType.Password) {
134137
sortedAuthMethodModels.push(method);
138+
passwordAuthFound = true;
139+
}
140+
if (method.authMethodType === AuthMethodType.Ldap) {
141+
ldapAuthFound = true;
135142
}
136143
});
137144

145+
// Using password authentication method to provide UI for LDAP authentication even if password auth is not present in server
146+
if (ldapAuthFound && !(passwordAuthFound)) {
147+
sortedAuthMethodModels.push(new AuthMethod(AuthMethodType.Password,0));
148+
}
149+
138150
authMethodModels.forEach((method) => {
139151
if (method.authMethodType !== AuthMethodType.Password) {
140152
sortedAuthMethodModels.push(method);

src/environments/environment.production.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const environment: Partial<BuildConfig> = {
1010
inlineCriticalCss: false,
1111
transferState: true,
1212
replaceRestUrl: true,
13-
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ],
13+
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ],
1414
enableSearchComponent: false,
1515
enableBrowseComponent: false,
1616
},

src/environments/environment.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const environment: BuildConfig = {
1414
inlineCriticalCss: false,
1515
transferState: true,
1616
replaceRestUrl: false,
17-
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ],
17+
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ],
1818
enableSearchComponent: false,
1919
enableBrowseComponent: false,
2020
},

src/environments/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const environment: Partial<BuildConfig> = {
1515
inlineCriticalCss: false,
1616
transferState: true,
1717
replaceRestUrl: false,
18-
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/' ],
18+
paths: [ '/home', '/items/', '/entities/', '/collections/', '/communities/', '/bitstream/', '/bitstreams/', '/handle/', '/reload/' ],
1919
enableSearchComponent: false,
2020
enableBrowseComponent: false,
2121
},

0 commit comments

Comments
 (0)