{
- await this.initMdsEditor();
+ try {
+ await this.initMdsEditor();
+ } catch (e) {
+ this.handleError(e);
+ this.dialogRef.close(null);
+ }
this.initButtons();
this.registerProgressIndicator();
// `SendFeedbackDialog` works similar to this component. Please update accordingly when
@@ -180,7 +185,7 @@ export class MdsEditorDialogComponent implements OnInit, AfterViewInit {
}
private handleError(error: any): void {
console.error(error);
- if (error instanceof UserPresentableError) {
+ if (error instanceof UserPresentableError || error.message) {
this.toast.error(null, error.message);
} else {
this.toast.error(error);
diff --git a/Frontend/src/app/features/dialogs/dialog-modules/simple-edit-dialog/simple-edit-license/simple-edit-license.component.ts b/Frontend/src/app/features/dialogs/dialog-modules/simple-edit-dialog/simple-edit-license/simple-edit-license.component.ts
index 6546c5b84f..9e7da0cc61 100644
--- a/Frontend/src/app/features/dialogs/dialog-modules/simple-edit-dialog/simple-edit-license/simple-edit-license.component.ts
+++ b/Frontend/src/app/features/dialogs/dialog-modules/simple-edit-dialog/simple-edit-license/simple-edit-license.component.ts
@@ -174,7 +174,7 @@ export class SimpleEditLicenseComponent implements OnInit {
this.initalAuthorFreetext = this.authorFreetext;
setTimeout(async () => {
if (updateInvalid) {
- this.invalid = !this.fromUpload && !isValid;
+ this.invalid = !isValid;
this.wasInvalid = this.invalid;
}
if (this.tpLicense && this.modeGroup) {
diff --git a/Frontend/src/app/features/mds/mds-editor/mds-editor-core/mds-editor-core.component.scss b/Frontend/src/app/features/mds/mds-editor/mds-editor-core/mds-editor-core.component.scss
index 8d571b586a..976fc9bf5b 100644
--- a/Frontend/src/app/features/mds/mds-editor/mds-editor-core/mds-editor-core.component.scss
+++ b/Frontend/src/app/features/mds/mds-editor/mds-editor-core/mds-editor-core.component.scss
@@ -6,4 +6,12 @@
//
// An alternative would be to use `overflow-x: clip` when it is supported by Safari.
padding: 0 var(--mds-editor-horizontal-padding, 0);
+ ::ng-deep {
+ // fix multi-line bottom hints
+ .mat-mdc-form-field-hint-wrapper,
+ .mat-mdc-form-field-error-wrapper {
+ position: relative;
+ margin-top: -20px;
+ }
+ }
}
diff --git a/Frontend/src/app/features/mds/mds-editor/mds-editor-instance.service.ts b/Frontend/src/app/features/mds/mds-editor/mds-editor-instance.service.ts
index 4b85c848e3..25618f44db 100644
--- a/Frontend/src/app/features/mds/mds-editor/mds-editor-instance.service.ts
+++ b/Frontend/src/app/features/mds/mds-editor/mds-editor-instance.service.ts
@@ -262,7 +262,10 @@ export class MdsEditorInstanceService implements OnDestroy {
}
// Set initial values, so the initial completion status is calculated correctly.
this.value$.next([...this.initialValues.jointValues]);
- if (this.mdsEditorInstanceService.getIsBulk(nodes)) {
+ if (
+ this.mdsEditorInstanceService.getIsBulk(nodes) &&
+ this.bulkMode.value !== 'replace'
+ ) {
this.bulkMode.next('no-change');
}
this.initialValuesSubject.next(this.initialValues);
diff --git a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-checkbox/mds-editor-widget-checkbox.component.ts b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-checkbox/mds-editor-widget-checkbox.component.ts
index 88afbc43f5..d486fa68da 100644
--- a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-checkbox/mds-editor-widget-checkbox.component.ts
+++ b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-checkbox/mds-editor-widget-checkbox.component.ts
@@ -12,17 +12,19 @@ export class MdsEditorWidgetCheckboxComponent extends MdsEditorWidgetBase implem
formControl: UntypedFormControl;
isIndeterminate: boolean;
- ngOnInit(): void {
- const initialValue = this.widget.getInitialValues()?.jointValues?.[0];
- this.isIndeterminate = !!this.widget.getInitialValues()?.individualValues;
- this.setIndeterminateValues(this.isIndeterminate);
+ async ngOnInit() {
this.formControl = new UntypedFormControl(
- initialValue === 'true',
+ false,
this.getStandardValidators({ requiredValidator }),
);
this.formControl.valueChanges.subscribe((value: boolean) => {
this.setValue([value ? value.toString() : 'false'], this.formControl.dirty);
});
+ const initialValue = (await this.widget.getInitalValuesAsync()).jointValues?.[0];
+ this.formControl.setValue(initialValue === 'true');
+ this.isIndeterminate = !!(await this.widget.getInitalValuesAsync()).individualValues;
+ this.setIndeterminateValues(this.isIndeterminate);
+
this.registerValueChanges(this.formControl);
}
diff --git a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-chips/mds-editor-widget-chips.component.scss b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-chips/mds-editor-widget-chips.component.scss
index a0360a273f..e14ee4adc7 100644
--- a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-chips/mds-editor-widget-chips.component.scss
+++ b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-chips/mds-editor-widget-chips.component.scss
@@ -23,7 +23,17 @@ mat-form-field {
// spacing for drop-down button
padding-right: 35px;
}
-
+mat-chip {
+ &.indeterminate {
+ background: repeating-linear-gradient(
+ -45deg,
+ var(--palette-primary-50),
+ var(--palette-primary-50) 5px,
+ var(--palette-primary-100) 5px,
+ var(--palette-primary-100) 10px
+ );
+ }
+}
.mat-select-arrow {
// Use the button color which respects disabled state.
color: unset;
diff --git a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-container/mds-editor-widget-container.component.html b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-container/mds-editor-widget-container.component.html
index 1c7d61e153..c0aed4fc1b 100644
--- a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-container/mds-editor-widget-container.component.html
+++ b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-container/mds-editor-widget-container.component.html
@@ -56,6 +56,7 @@
-
- {{ widget.definition.bottomCaption }}
-
+ {{
+ widget.definition.bottomCaption
+ }}
diff --git a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-container/mds-editor-widget-container.component.ts b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-container/mds-editor-widget-container.component.ts
index edcdc4ff37..52f8b5602c 100644
--- a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-container/mds-editor-widget-container.component.ts
+++ b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-container/mds-editor-widget-container.component.ts
@@ -79,6 +79,10 @@ export class MdsEditorWidgetContainerComponent
@Input() injectedView: MdsEditorWidgetBase | NativeWidgetComponent;
@Input() valueType: ValueType;
@Input() label: string | boolean;
+ /*+
+ display the bottom caption, if present on the widget
+ */
+ @Input() showBottomCaption = true;
@Input() control: AbstractControl;
/**
* Whether to wrap in a `mat-form-field`.
diff --git a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-radio-button/mds-editor-widget-radio-button.component.scss b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-radio-button/mds-editor-widget-radio-button.component.scss
index 3b02e123e2..6f684f1f43 100644
--- a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-radio-button/mds-editor-widget-radio-button.component.scss
+++ b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-radio-button/mds-editor-widget-radio-button.component.scss
@@ -1,18 +1,21 @@
$button-margin-horizontal: 20px;
$button-margin-vertical: 10px;
-.mat-radio-group {
+mat-radio-group {
display: flex;
flex-wrap: wrap;
margin-right: -$button-margin-horizontal;
- margin-bottom: -$button-margin-vertical;
padding: 5px 20px;
&.vertical {
flex-direction: column;
}
}
-.mat-radio-button {
+mat-radio-button.mat-mdc-radio-button {
margin-right: $button-margin-horizontal;
- margin-bottom: $button-margin-vertical;
+ ::ng-deep {
+ .mdc-radio {
+ --mdc-radio-state-layer-size: 32px;
+ }
+ }
}
diff --git a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-select/mds-editor-widget-select.component.ts b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-select/mds-editor-widget-select.component.ts
index 57c943156c..7a915f1722 100644
--- a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-select/mds-editor-widget-select.component.ts
+++ b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-select/mds-editor-widget-select.component.ts
@@ -4,6 +4,7 @@ import { MatTooltip } from '@angular/material/tooltip';
import { MdsWidget, MdsWidgetValue } from '../../../types/types';
import { MdsEditorWidgetBase, ValueType } from '../mds-editor-widget-base';
import { MatSelect } from '@angular/material/select';
+import { skip } from 'rxjs/operators';
@Component({
selector: 'es-mds-editor-widget-select',
@@ -45,10 +46,15 @@ export class MdsEditorWidgetSelectComponent extends MdsEditorWidgetBase implemen
);
}
});
+ this.formControl.valueChanges.subscribe((value) =>
+ this.setValue(value ? [value.id] : [null]),
+ );
+ } else {
+ // skip first because the init state will cause a trigger
+ this.formControl.valueChanges
+ .pipe(skip(1))
+ .subscribe((value) => this.setValue(value ? [value.id] : [null]));
}
- this.formControl.valueChanges.subscribe((value) => {
- this.setValue(value ? [value.id] : [null]);
- });
this.registerValueChanges(this.formControl);
}
diff --git a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-text/mds-editor-widget-text.component.html b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-text/mds-editor-widget-text.component.html
index 59d4a48247..5f5b8e3252 100644
--- a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-text/mds-editor-widget-text.component.html
+++ b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-text/mds-editor-widget-text.component.html
@@ -36,7 +36,9 @@
[injectedView]="this"
[widget]="widget"
[label]="false"
+ [control]="formControl"
[wrapInFormField]="false"
+ [showBottomCaption]="false"
[valueType]="valueType"
>
@@ -63,12 +65,12 @@
(blur)="blur()"
(keydown.enter)="submit()"
>
-
- {{ widget.definition.bottomCaption }}
-
-
-
-
+ {{
+ widget.definition.bottomCaption
+ }}
+
diff --git a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-wysiwyg-html/mds-editor-widget-tinymce.component.ts b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-wysiwyg-html/mds-editor-widget-tinymce.component.ts
index a0dc0440b1..12c4756488 100644
--- a/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-wysiwyg-html/mds-editor-widget-tinymce.component.ts
+++ b/Frontend/src/app/features/mds/mds-editor/widgets/mds-editor-widget-wysiwyg-html/mds-editor-widget-tinymce.component.ts
@@ -84,6 +84,8 @@ export class MdsEditorWidgetTinyMCE extends MdsEditorWidgetBase implements OnIni
async ngAfterViewInit() {
this._html = (await this.widget.getInitalValuesAsync()).jointValues[0];
+ (this.editorConfigDefault as any).base_url =
+ this.platformLocation.getBaseHrefFromDOM() + 'tinymce/';
if (this.widget.definition.configuration) {
this.editorConfig = {
...this.editorConfigDefault,
diff --git a/Frontend/src/app/main/error-handler.service.ts b/Frontend/src/app/main/error-handler.service.ts
index 1784b2bc09..1f58d5c16f 100644
--- a/Frontend/src/app/main/error-handler.service.ts
+++ b/Frontend/src/app/main/error-handler.service.ts
@@ -24,7 +24,11 @@ export class ErrorHandlerService {
async handleError(error: ApiErrorResponse, req: HttpRequest) {
// console.log('handleError', error, req);
- if (req.method === 'GET' && req.url === this.getApiUrl('/config/v1/values')) {
+ if (error?.error?.type === 'abort') {
+ // this might cause by explicit abort and a redirect
+ // do nothing to prevent firefox from showing a temporary message i.e. on login sso redirect
+ console.warn('Explicitly aborted, do not displaying a message', error);
+ } else if (req.method === 'GET' && req.url === this.getApiUrl('/config/v1/values')) {
this.showConfigurationErrorNotice(error);
} else if (
req.method === 'GET' &&
diff --git a/Frontend/src/app/main/navigation/main-menu-dropdown/main-menu-dropdown.component.scss b/Frontend/src/app/main/navigation/main-menu-dropdown/main-menu-dropdown.component.scss
index b66d9667d6..d66ad8a082 100644
--- a/Frontend/src/app/main/navigation/main-menu-dropdown/main-menu-dropdown.component.scss
+++ b/Frontend/src/app/main/navigation/main-menu-dropdown/main-menu-dropdown.component.scss
@@ -22,18 +22,20 @@ $mainMenuSelectedBackground: linear-gradient(
@if variable-exists(mainMenuBackgroundColor) {
background-color: $mainMenuBackgroundColor;
}
- .mat-menu-item {
+ .mat-mdc-menu-item {
@if variable-exists(mainMenuForegroundColor) {
&:not(:disabled) {
- color: $mainMenuForegroundColor;
- @if variable-exists(mainMenuForegroundColorIcon) {
- > i {
- color: $mainMenuForegroundColorIcon;
+ > span {
+ color: $mainMenuForegroundColor;
+ @if variable-exists(mainMenuForegroundColorIcon) {
+ > i {
+ color: $mainMenuForegroundColorIcon;
+ }
}
}
}
}
- &.mat-menu-item-selected {
+ &.mat-mdc-menu-item-selected {
background: $mainMenuSelectedBackground;
}
&.cdk-focused {
@@ -45,10 +47,12 @@ $mainMenuSelectedBackground: linear-gradient(
&.cdk-key-focused {
background-color: $mainMenuHoverBackgroundColor;
@if variable-exists(mainMenuBackgroundColor) {
- color: $mainMenuHoverForegroundColor;
- @if variable-exists(mainMenuHoverForegroundColorIcon) {
- > i {
- color: $mainMenuHoverForegroundColorIcon;
+ > span {
+ color: $mainMenuHoverForegroundColor;
+ @if variable-exists(mainMenuHoverForegroundColorIcon) {
+ > i {
+ color: $mainMenuHoverForegroundColorIcon;
+ }
}
}
}
diff --git a/Frontend/src/app/main/navigation/top-bar/top-bar.component.html b/Frontend/src/app/main/navigation/top-bar/top-bar.component.html
index 1568a48f56..4e16b16c94 100644
--- a/Frontend/src/app/main/navigation/top-bar/top-bar.component.html
+++ b/Frontend/src/app/main/navigation/top-bar/top-bar.component.html
@@ -160,7 +160,7 @@
data-test="main-nav-user-menu-button"
>
- {{ currentUser | authorityName }}
+ {{ currentUser | nodePersonName }}
{{ 'USER_GUEST' | translate }}
diff --git a/Frontend/src/app/main/navigation/top-bar/top-bar.component.scss b/Frontend/src/app/main/navigation/top-bar/top-bar.component.scss
index e9e6e1e182..851330b095 100644
--- a/Frontend/src/app/main/navigation/top-bar/top-bar.component.scss
+++ b/Frontend/src/app/main/navigation/top-bar/top-bar.component.scss
@@ -47,6 +47,7 @@ es-imprint-privacy ::ng-deep {
border: none;
outline: none;
background-color: unset;
+ font-family: $primaryFontFamily;
color: $workspaceTopBarFontColor !important;
& ::ng-deep .mat-ripple-element {
background-color: #{color.change($workspaceTopBarFontColor, $alpha: 0.1)};
@@ -97,6 +98,7 @@ es-imprint-privacy ::ng-deep {
.menuButton img {
margin-left: 0;
width: 35px;
+ margin-right: 5px;
}
span {
diff --git a/Frontend/src/app/pages/admin-page/admin-page.component.html b/Frontend/src/app/pages/admin-page/admin-page.component.html
index 88a0f9fc39..9e749e1e58 100644
--- a/Frontend/src/app/pages/admin-page/admin-page.component.html
+++ b/Frontend/src/app/pages/admin-page/admin-page.component.html
@@ -821,12 +821,6 @@ {{ 'ADMIN.JOBS.PARAMETERS' | translate }}
{{ 'ADMIN.TOOLKIT.AUTHENTICATE' | translate }}
-
-
{{ 'ADMIN.TOOLKIT.REFRESH_EDU_GROUP_CACHE' | translate }}
-
-
cached{{ 'ADMIN.TOOLKIT.CACHE' | translate }}
diff --git a/Frontend/src/app/pages/admin-page/admin-page.component.ts b/Frontend/src/app/pages/admin-page/admin-page.component.ts
index 2c7a5705e2..5d65493001 100644
--- a/Frontend/src/app/pages/admin-page/admin-page.component.ts
+++ b/Frontend/src/app/pages/admin-page/admin-page.component.ts
@@ -602,19 +602,7 @@ export class AdminPageComponent implements OnInit, OnDestroy {
},
);
}
- public refreshEduGroupCache() {
- this.globalProgress = true;
- this.admin.refreshEduGroupCache().subscribe(
- () => {
- this.globalProgress = false;
- this.toast.toast('ADMIN.TOOLKIT.EDU_GROUP_CACHE_REFRESHED');
- },
- (error: any) => {
- this.globalProgress = false;
- this.toast.error(error);
- },
- );
- }
+
public refreshCache(sticky: boolean) {
this.globalProgress = true;
this.admin
diff --git a/Frontend/src/app/pages/render-page/render-page.component.ts b/Frontend/src/app/pages/render-page/render-page.component.ts
index 25189c4967..c1e96e4fe0 100644
--- a/Frontend/src/app/pages/render-page/render-page.component.ts
+++ b/Frontend/src/app/pages/render-page/render-page.component.ts
@@ -776,7 +776,7 @@ export class RenderPageComponent implements EventListener, OnInit, OnDestroy, Af
params.mds = this.getMdsId();
params.sidenav = true;
params.repo = this.repository;
- params.parameters = JSON.stringify(data);
+ params.filters = JSON.stringify(data);
this.router.navigate([UIConstants.ROUTER_PREFIX + 'search'], { queryParams: params });
});
}
diff --git a/Frontend/src/app/pages/search-page/search-page-results-all.component.html b/Frontend/src/app/pages/search-page/search-page-results-all.component.html
index 017645b92c..c2eaf16cce 100644
--- a/Frontend/src/app/pages/search-page/search-page-results-all.component.html
+++ b/Frontend/src/app/pages/search-page/search-page-results-all.component.html
@@ -35,7 +35,7 @@
- {{ repo.title | titlecase }}
+ {{ repo.title }}
({{ repo.dataSource.getTotal() }})
diff --git a/Frontend/src/app/pages/workspace-page/workspace-page.component.ts b/Frontend/src/app/pages/workspace-page/workspace-page.component.ts
index 6e0284d30a..237af19243 100644
--- a/Frontend/src/app/pages/workspace-page/workspace-page.component.ts
+++ b/Frontend/src/app/pages/workspace-page/workspace-page.component.ts
@@ -332,9 +332,9 @@ export class WorkspacePageComponent implements EventListener, OnInit, OnDestroy
handleDrop(event: { target: DropTarget; source: DropSource }) {
if (event.source.mode === 'copy') {
- this.copyNode(event.target, event.source.element);
+ this.copyNode(event.target, event.source.element?.slice());
} else {
- this.moveNode(event.target, event.source.element);
+ this.moveNode(event.target, event.source.element?.slice());
}
/*
this.dialogTitle="WORKSPACE.DRAG_DROP_TITLE";
diff --git a/Frontend/src/app/shared/components/collection-chooser/collection-chooser.component.ts b/Frontend/src/app/shared/components/collection-chooser/collection-chooser.component.ts
index 131dd28d0f..0415c93cd4 100644
--- a/Frontend/src/app/shared/components/collection-chooser/collection-chooser.component.ts
+++ b/Frontend/src/app/shared/components/collection-chooser/collection-chooser.component.ts
@@ -46,6 +46,7 @@ export class CollectionChooserComponent implements OnInit {
readonly NodeEntriesDisplayType = NodeEntriesDisplayType;
readonly InteractionType = InteractionType;
readonly COLLECTION_LATEST_DEFAULT_COUNT = 3;
+ readonly COLLECTION_MY_MAX_COUNT = 100;
@ContentChild('beforeRecent') beforeRecentRef: TemplateRef;
/**
* The caption of the dialog, will be translated automatically
@@ -254,7 +255,7 @@ export class CollectionChooserComponent implements OnInit {
{
sortBy: this.sortBy,
sortAscending: false,
- count: RestConstants.COUNT_UNLIMITED,
+ count: this.COLLECTION_MY_MAX_COUNT,
},
)
.subscribe((data) => {
diff --git a/Frontend/src/assets/i18n/admin/de.json b/Frontend/src/assets/i18n/admin/de.json
index 55dabd4706..117fe489e6 100644
--- a/Frontend/src/assets/i18n/admin/de.json
+++ b/Frontend/src/assets/i18n/admin/de.json
@@ -305,8 +305,6 @@
"TOOLKIT": {
"REFRESH_APP": "App Info neu laden",
"REFRESH_APP_INFO": "Metadaten und Application-Info neu laden",
- "REFRESH_EDU_GROUP_CACHE": "Edu-Gruppen-Cache aktualisieren",
- "EDU_GROUP_CACHE_REFRESHED": "Edu-Gruppen-Cache aktualisiert",
"APP_INFO_REFRESHED": "Aktualisieren der Anwendungsinformationen abgeschlossen",
"CACHE": "Cache Verwaltung",
"CACHE_INFO": "Cache Info abrufen",
diff --git a/Frontend/src/assets/i18n/admin/en.json b/Frontend/src/assets/i18n/admin/en.json
index c35af891cd..61c56d66dd 100644
--- a/Frontend/src/assets/i18n/admin/en.json
+++ b/Frontend/src/assets/i18n/admin/en.json
@@ -297,8 +297,6 @@
"TOOLKIT": {
"REFRESH_APP": "Reload App Info",
"REFRESH_APP_INFO": "Reload metadata and application info",
- "REFRESH_EDU_GROUP_CACHE": "Refresh Edu Group Cache",
- "EDU_GROUP_CACHE_REFRESHED": "Refresh Edu Group Cache done",
"APP_INFO_REFRESHED": "Refresh Application Info done",
"CACHE": "Cache management",
"CACHE_INFO": "Get Cache Info",
diff --git a/Frontend/src/assets/i18n/admin/fr.json b/Frontend/src/assets/i18n/admin/fr.json
index 5b69856605..b8fef602c1 100644
--- a/Frontend/src/assets/i18n/admin/fr.json
+++ b/Frontend/src/assets/i18n/admin/fr.json
@@ -294,8 +294,6 @@
"TOOLKIT": {
"REFRESH_APP": "Reload App Info",
"REFRESH_APP_INFO": "Recharger les métadonnées et les informations sur l'application",
- "REFRESH_EDU_GROUP_CACHE": "Rafraîchir le cache du groupe Edu",
- "EDU_GROUP_CACHE_REFRESHED": "Rafraîchir le cache du groupe Edu fait",
"APP_INFO_REFRESHED": "Rafraîchir les informations sur l'application fait",
"CACHE": "Gestion du cache",
"CACHE_INFO": "Obtenir des informations sur le cache",
@@ -621,7 +619,7 @@
"TOKEN": "Jeton",
"TS": "Date d'expiration",
"GENERATE": "Ajouter un jeton",
- "SAVE": "Économiser",
+ "SAVE": "Sauver",
"REMOVE_TITLE": "Supprimer le jeton ?",
"REMOVE_MESSAGE": "Voulez-vous vraiment supprimer le jeton avec l'url \"{{url}}\" ?\n\nLes liens existants peuvent devenir indisponibles en raison de ce processus.",
"DYNAMIC_INFO": "Avec l'enregistrement dynamique lti, vous pouvez interconnecter edu-sharing avec d'autres systèmes compatibles lti. Cliquez sur \"Generate Token\" pour générer un nouveau jeton url.\n\nInsérez-le dans votre système compatible lti (par exemple moodle). Le système externe sera ensuite automatiquement connecté.",
diff --git a/Frontend/src/assets/i18n/admin/it.json b/Frontend/src/assets/i18n/admin/it.json
index 1e98627a3d..2883024612 100644
--- a/Frontend/src/assets/i18n/admin/it.json
+++ b/Frontend/src/assets/i18n/admin/it.json
@@ -294,8 +294,6 @@
"TOOLKIT": {
"REFRESH_APP": "Ricarica Info sull'app",
"REFRESH_APP_INFO": "Ricarica i metadati e le informazioni sull'applicazione",
- "REFRESH_EDU_GROUP_CACHE": "Aggiorna la cache del gruppo Edu",
- "EDU_GROUP_CACHE_REFRESHED": "Aggiornare la cache del gruppo Edu",
"APP_INFO_REFRESHED": "Aggiornare le informazioni sull'applicazione",
"CACHE": "Gestione della cache",
"CACHE_INFO": "Ottieni informazioni sulla cache",
diff --git a/Frontend/src/assets/i18n/common/de-no-binnen-i.json b/Frontend/src/assets/i18n/common/de-no-binnen-i.json
index d2353c720c..6a819f5e14 100644
--- a/Frontend/src/assets/i18n/common/de-no-binnen-i.json
+++ b/Frontend/src/assets/i18n/common/de-no-binnen-i.json
@@ -18,7 +18,7 @@
"WARNING": {
"NO_LICENSE": "Dieses Material besitzt noch keine Lizenz.\nSetzen Sie sich ggf. mit der Autorin/dem Autor in Verbindung, um Lizenzverstöße zu vermeiden.",
"COPYRIGHT": "Dieses Material besitzt eine Copyright-Lizenz.\nSetzen Sie sich ggf. mit der Autorin/dem Autor in Verbindung, um Lizenzverstöße zu vermeiden.",
- "ND": "Dieses Material besitzt eine Non Derivative Lizenz. Diese Lizenz legt fest, dass das Material nicht verändert werden darf.\nSetzen Sie sich ggf. mit der AUtorin/dem Autor in Verbindung, um Lizenzverstöße zu vermeiden."
+ "ND": "Dieses Material besitzt eine Non Derivative Lizenz. Diese Lizenz legt fest, dass das Material nicht verändert werden darf.\nSetzen Sie sich ggf. mit der Autorin/dem Autor in Verbindung, um Lizenzverstöße zu vermeiden."
}
},
"FEEDBACK": {
diff --git a/Frontend/src/assets/i18n/common/de.json b/Frontend/src/assets/i18n/common/de.json
index 54dc54d653..05819ee9bb 100644
--- a/Frontend/src/assets/i18n/common/de.json
+++ b/Frontend/src/assets/i18n/common/de.json
@@ -615,6 +615,7 @@
"imsqti_xmlv2p1_test": "Test",
"imsqti_xmlv2p1_item": "Aufgabe",
"text/html": "HTML-Dokument (.html)",
+ "h5p": "H5P-Datei (.h5p)",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "Textdokument (.docx)",
"application/vnd.oasis.opendocument.text": "Textdokument (.odt)",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "Tabelle (.xlsx)",
diff --git a/Frontend/src/assets/i18n/common/en.json b/Frontend/src/assets/i18n/common/en.json
index 472649ba74..fa163107be 100644
--- a/Frontend/src/assets/i18n/common/en.json
+++ b/Frontend/src/assets/i18n/common/en.json
@@ -529,6 +529,7 @@
"imsqti_xmlv2p1_test": "Test",
"imsqti_xmlv2p1_item": "Task",
"text/html": "html document (.html)",
+ "h5p": "h5p file (.h5p)",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "text document (.docx)",
"application/vnd.oasis.opendocument.text": "text document (.odt)",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "spreadsheet (.xlsx)",
diff --git a/Frontend/src/assets/i18n/messages/de-no-binnen-i.json b/Frontend/src/assets/i18n/messages/de-no-binnen-i.json
index 128b879d7e..2067a0aead 100644
--- a/Frontend/src/assets/i18n/messages/de-no-binnen-i.json
+++ b/Frontend/src/assets/i18n/messages/de-no-binnen-i.json
@@ -1,6 +1,6 @@
{
"MESSAGES": {
- "share_file_deleted": "Die Linkfreigabe zeigt auf eine bereits gelöschte Datei. Bitte kontaktieren Sie den/die Bitte kontaktieren Sie die Autorin/den Autor",
+ "share_file_deleted": "Die Linkfreigabe zeigt auf eine bereits gelöschte Datei. Bitte kontaktieren Sie die Autorin/den Autor",
"usage_missing": "Der Zugriff auf das Element ist fehlgeschlagen, da die Freigabe für den aktuellen Kontext entfernt wurde. Bitte wenden Sie sich an die Autorin/den Autorin der Seite, von welcher der Aufruf erfolgte"
}
}
diff --git a/Frontend/src/assets/i18n/messages/de.json b/Frontend/src/assets/i18n/messages/de.json
index 0c0663de4f..252f890ebd 100644
--- a/Frontend/src/assets/i18n/messages/de.json
+++ b/Frontend/src/assets/i18n/messages/de.json
@@ -13,6 +13,11 @@
"SHARING_ERROR": "Freigeben fehlgeschlagen",
"LTI_ERROR": "LTI Prozess fehlgeschlagen",
"LTI_REG_ERROR": "Anbindung der LTI Plattform fehlgeschlagen",
+ "USER_BLOCKED": "Login nicht möglich",
+ "SSO_INSUFFICIENT_REQUIREMENTS": "Login nicht möglich",
+ "SSO_UNKNOWN_ERROR": "Login nicht möglich",
+ "MISSING_PARAM": "Login nicht möglich",
+ "SSO_REQ_ATT_NOT_MATCHES": "Login nicht möglich",
"DETAILS": {
"403": "Der Zugriff auf den gewünschten Bereich bzw. die gewünschte Ressource ist leider nicht möglich",
"404": "Fehler 404",
@@ -25,7 +30,12 @@
"SHARING_ERROR": "edu-sharing kann aktuell leider nur Dateien begrenzter Größe teilen. Bitte versuchen Sie es mit einer anderen Datei",
"LTI_ERROR": "Fehlermeldung: {{text}}",
"LTI_REG_ERROR": "Fehlermeldung: {{text}}",
- "INVALID": "Wenn dieser Fehler weiterhin auftritt, wenden Sie sich an den Betreiber des Systems"
+ "INVALID": "Wenn dieser Fehler weiterhin auftritt, wenden Sie sich an den Betreiber des Systems",
+ "USER_BLOCKED": "Benutzer gesperrt",
+ "SSO_INSUFFICIENT_REQUIREMENTS": "Vorraussetzungen nicht gegeben",
+ "SSO_UNKNOWN_ERROR": "unbekannter Fehler",
+ "MISSING_PARAM": "unvollständige Benutzerinformationen",
+ "SSO_REQ_ATT_NOT_MATCHES": "falsche Nutzerinformationen"
}
}
}
diff --git a/Frontend/src/assets/i18n/messages/en.json b/Frontend/src/assets/i18n/messages/en.json
index caed6525e4..8618d19628 100644
--- a/Frontend/src/assets/i18n/messages/en.json
+++ b/Frontend/src/assets/i18n/messages/en.json
@@ -13,6 +13,11 @@
"LTI_ERROR": "LTI process failed",
"LTI_REG_ERROR": "Connection to LTI platform failed",
"SHARING_ERROR": "Sharing failed",
+ "USER_BLOCKED": "Login not possible",
+ "SSO_INSUFFICIENT_REQUIREMENTS": "Login not possible",
+ "SSO_UNKNOWN_ERROR": "Login not possible",
+ "MISSING_PARAM": "Login not possible",
+ "SSO_REQ_ATT_NOT_MATCHES": "Login not possible",
"DETAILS": {
"share_expired": "The shared link has expired or has been terminated by the owner of the material.",
"share_file_deleted": "The shared link points to an object which has been deleted. Please contact the author.",
@@ -25,7 +30,12 @@
"403": "The access to the given resource is restricted.",
"404": "Error 404",
"500": "Error 500",
- "SHARING_ERROR": "Unfortunately, edu-sharing can currently only share files of a limited size. Please try with a different file"
+ "SHARING_ERROR": "Unfortunately, edu-sharing can currently only share files of a limited size. Please try with a different file",
+ "USER_BLOCKED": "User blocked",
+ "SSO_INSUFFICIENT_REQUIREMENTS": "Insufficient login requirements",
+ "MISSING_PARAM": "Incomplete user data",
+ "SSO_UNKNOWN_ERROR": "Unknown error",
+ "SSO_REQ_ATT_NOT_MATCHES": "wrong userdata"
}
}
}
diff --git a/Frontend/src/assets/i18n/permissions/de-no-binnen-i.json b/Frontend/src/assets/i18n/permissions/de-no-binnen-i.json
index 3516a37bc4..62b3089706 100644
--- a/Frontend/src/assets/i18n/permissions/de-no-binnen-i.json
+++ b/Frontend/src/assets/i18n/permissions/de-no-binnen-i.json
@@ -27,10 +27,6 @@
"TAB": {
"USER": "Nutzende Person"
},
- "DELETE": {
- "MAIN_HEADING": "Nutzende Person & Daten löschen",
- "RECEIVER": "Nutzende Person suchen..."
- },
"TOOLPERMISSIONS": {
"EVERYONE_ALLOWED": "Ausgangswert für alle Nutzenden",
@@ -38,6 +34,8 @@
},
"DELETE": {
+ "MAIN_HEADING": "Nutzende Person & Daten löschen",
+ "RECEIVER": "Nutzende Person suchen...",
"CONFIRM": {
"USERS": "Die Aktion wird für alle folgenden Nutzenden und deren gespeicherte Daten angewandt:",
"RECEIVER_CAPTION": "Die gewählte Person wird als erstellende Person in der Daten & Sammlungen angezeigt"
diff --git a/Frontend/src/assets/i18n/search/fr.json b/Frontend/src/assets/i18n/search/fr.json
index cae6979eb1..dea9f8e8bc 100644
--- a/Frontend/src/assets/i18n/search/fr.json
+++ b/Frontend/src/assets/i18n/search/fr.json
@@ -25,7 +25,7 @@
"HIDE_EXPANDED_SEARCH": "Masquer la recherche étendue",
"TOGGLE_RESULT_VIEW": "Vue alternée",
"EMBED_SEARCH_ACTION": "Intégrer la recherche en cours",
- "SAVE_SEARCH_ACTION": "Économiser",
+ "SAVE_SEARCH_ACTION": "Sauver",
"FILTER": "Filtre",
"FILTERS": "Filtres",
"FILTER_BY": "Filtrer par : {{property}}",
diff --git a/Frontend/src/assets/i18n/workspace/de-no-binnen-i.json b/Frontend/src/assets/i18n/workspace/de-no-binnen-i.json
index b6cf94c395..27b087a0e0 100644
--- a/Frontend/src/assets/i18n/workspace/de-no-binnen-i.json
+++ b/Frontend/src/assets/i18n/workspace/de-no-binnen-i.json
@@ -22,9 +22,9 @@
},
"CONTRIBUTOR": {
+ "ADD_TITLE": "Neue beteiligte Person angeben",
"TYPE": {
"AUTHOR": "Autorin/Autor",
- "ADD_TITLE": "Neue beteiligte Person angeben",
"PUBLISHER": "Herausgeberschaft",
"INITIATOR": "Auftrag",
"GRAPHICAL_DESIGNER": "Grafik",
diff --git a/config/defaults/pom.xml b/config/defaults/pom.xml
index d3a15b3715..e309d650cd 100644
--- a/config/defaults/pom.xml
+++ b/config/defaults/pom.xml
@@ -19,6 +19,15 @@
edu_sharing-community-repository-config-defaults
+
+
+ src/main/resources
+
+
+ src/main/templates
+ true
+
+
diff --git a/config/defaults/src/main/resources/caches.properties b/config/defaults/src/main/resources/caches.properties
index 9e950e6c62..25e5b9bf55 100644
--- a/config/defaults/src/main/resources/caches.properties
+++ b/config/defaults/src/main/resources/caches.properties
@@ -84,16 +84,6 @@ cache.eduSharingEditLockCache.maxIdleSeconds=0
cache.eduSharingEditLockCache.maxItems=120000
cache.eduSharingEditLockCache.timeToLiveSeconds=0
-cache.eduSharingEduGroupCache.eviction-policy=LRU
-cache.eduSharingEduGroupCache.maxIdleSeconds=0
-cache.eduSharingEduGroupCache.maxItems=120000
-cache.eduSharingEduGroupCache.timeToLiveSeconds=0
-
-cache.eduSharingEduGroupFolderCache.eviction-policy=LRU
-cache.eduSharingEduGroupFolderCache.maxIdleSeconds=0
-cache.eduSharingEduGroupFolderCache.maxItems=120000
-cache.eduSharingEduGroupFolderCache.timeToLiveSeconds=0
-
cache.eduSharingLightBendConfigCache.eviction-policy=LRU
cache.eduSharingLightBendConfigCache.maxIdleSeconds=0
cache.eduSharingLightBendConfigCache.maxItems=1000
diff --git a/config/defaults/src/main/resources/edu-sharing.reference.conf b/config/defaults/src/main/resources/edu-sharing.reference.conf
index 21a7b80dab..61704d7b76 100644
--- a/config/defaults/src/main/resources/edu-sharing.reference.conf
+++ b/config/defaults/src/main/resources/edu-sharing.reference.conf
@@ -8,6 +8,26 @@
// security and management functions
security {
+ access: {
+ // whether openapi access is allowed. possible values: "disabled", "admin", "enabled"
+ openapi: "enabled"
+ // config for rest endpoint
+ // note: The list works with prefixes, so "/register" would disable all register endpoints
+ // You can choose the state "disabled" or "admin"
+ endpoints: {
+ // "/statistic/v1/public": "admin"
+ // "/statistic/v1/facets": "admin"
+ // "/stream/v1": "admin"
+ // "/relation/v1": "admin"
+ // "/register/v1": "admin"
+ // "/rating/v1": "admin"
+ // "/notification/v1": "admin"
+ // "/knowledge/v1": "admin"
+ // "/feedback/v1": "admin"
+ // "/comment/v1": "admin"
+ // "/clientUtils/v1": "admin"
+ }
+ }
fileManagement {
limits: {
// max allowed size of files that can be uploaded (in bytes)
@@ -133,6 +153,11 @@ security {
// allow authentication from lti connected plattforms
enabled: false
}
+
+ external: {
+ //allow upstream service provider like apache shibd
+ enabled: false
+ }
}
}
@@ -184,10 +209,20 @@ repository: {
// // id of the group (GROUP_ prefix is not necessary)
// id: "MY_GROUP"
// // display name of the group
- // displayName: ["My group name"]
+ // displayName: "My group name"
// }
]
}
+ // configuration for default user
+ persons: [
+ // {
+ // authorityName: "MMiller",
+ // profile: {firstName:"Mike", lastName:"Miller"}
+ // password: "1234",
+ // primaryAffiliation: "teacher",
+ // groups: ["GROUP_A"]
+ // }
+ ]
// configuration for toolpermissions
toolpermissions: {
// managed toolpermissions
@@ -552,6 +587,8 @@ importer:{
exporter:{
oai:{
+ // when disabled, the oai endpoint will return a forbidden status
+ enabled: true
identify:{
name: null // repo name, if null, the local app caption will be used
adminEmail: "adminpleasechange@nodomain.com"
diff --git a/config/defaults/src/main/resources/metadatasets/xml/mds.xml b/config/defaults/src/main/resources/metadatasets/xml/mds.xml
index e3b9eb6169..f4a9fbedea 100644
--- a/config/defaults/src/main/resources/metadatasets/xml/mds.xml
+++ b/config/defaults/src/main/resources/metadatasets/xml/mds.xml
@@ -1178,27 +1178,6 @@
AND
-
- ASPECT:"ccm:collection" AND @ccm\:collectionlevel0:true AND OWNER:"${authority}"
-
-
- ASPECT:"ccm:collection" AND @ccm\:collectionlevel0:true AND NOT OWNER:"${authority}" AND NOT
- @ccm\:collectiontype:"EDITORIAL" AND NOT @ccm\:collectiontype:"MEDIA_CENTER"
-
-
-
- ASPECT:"ccm:collection" AND @ccm\:collectionlevel0:true AND @ccm\:collectiontype:"EDITORIAL"
-
-
-
- ASPECT:"ccm:collection" AND @ccm\:collectionlevel0:true AND @ccm\:collectiontype:"MEDIA_CENTER"
-
-
-
- ASPECT:"ccm:collection" AND @ccm\:collectionlevel0:true AND NOT @ccm\:collectiontype:"EDITORIAL" AND
- NOT @ccm\:collectiontype:"MEDIA_CENTER"
-
-
ASPECT:"sys:archived"
@@ -1285,6 +1264,75 @@
]
}}
+
+
+ {"bool":
+ {"must":[
+ {"match":{"nodeRef.storeRef.protocol":"workspace"}},
+ {"match":{"aspects":"ccm:collection"}},
+ {"match":{"properties.ccm:collectionlevel0.keyword":"true"}},
+ {"match":{"properties.cm:owner.keyword":"${authority}"}}
+ ]}
+ }
+
+
+
+
+ {"bool":
+ {"must":[
+ {"match":{"nodeRef.storeRef.protocol":"workspace"}},
+ {"match":{"aspects":"ccm:collection"}},
+ {"match":{"properties.ccm:collectionlevel0.keyword":"true"}}
+ ],
+ "must_not":[
+ {"match":{"permissions.Read":"GROUP_EVERYONE"}},
+ {"match":{"properties.cm:owner.keyword":"${authority}"}},
+ {"match":{"properties.ccm:collectiontype.keyword":"EDITORIAL"}},
+ {"match":{"properties.ccm:collectiontype.keyword":"MEDIA_CENTER"}}
+ ]}
+ }
+
+
+
+
+ {"bool":
+ {"must":[
+ {"match":{"nodeRef.storeRef.protocol":"workspace"}},
+ {"match":{"aspects":"ccm:collection"}},
+ {"match":{"properties.ccm:collectionlevel0.keyword":"true"}},
+ {"match":{"properties.ccm:collectiontype.keyword":"EDITORIAL"}}
+ ]}
+ }
+
+
+
+
+ {"bool":
+ {"must":[
+ {"match":{"nodeRef.storeRef.protocol":"workspace"}},
+ {"match":{"aspects":"ccm:collection"}},
+ {"match":{"properties.ccm:collectionlevel0.keyword":"true"}},
+ {"match":{"properties.ccm:collectiontype.keyword":"MEDIA_CENTER"}}
+ ]}
+ }
+
+
+
+
+ {"bool":
+ {"must":[
+ {"match":{"permissions.Read":"GROUP_EVERYONE"}},
+ {"match":{"nodeRef.storeRef.protocol":"workspace"}},
+ {"match":{"aspects":"ccm:collection"}},
+ {"match":{"properties.ccm:collectionlevel0.keyword":"true"}}
+ ],
+ "must_not":[
+ {"match":{"properties.ccm:collectiontype.keyword":"EDITORIAL"}},
+ {"match":{"properties.ccm:collectiontype.keyword":"MEDIA_CENTER"}}
+ ]}
+ }
+
+
true
diff --git a/config/defaults/src/main/templates/repository-version.json b/config/defaults/src/main/templates/repository-version.json
new file mode 100644
index 0000000000..c6e5a7264c
--- /dev/null
+++ b/config/defaults/src/main/templates/repository-version.json
@@ -0,0 +1,33 @@
+{
+ "repository": "repository",
+ "git": {
+ "branch": "${git.branch}",
+ "closest": {
+ "tag": {
+ "name": "${git.closest.tag.fixed}"
+ }
+ },
+ "commit": {
+ "id": "${git.commit.id}",
+ "timestamp": {
+ "datetime": "${git.commit.timestamp.datetime}"
+ }
+ },
+ "dirty": "${git.dirty}"
+ },
+ "maven": {
+ "project": {
+ "artifactId": "${project.artifactId}",
+ "groupId": "${project.groupId}",
+ "version": "${project.version}"
+ }
+ },
+ "version": {
+ "full": "${git.closest.tag.fixed}",
+ "major": "${parsedVersion.majorVersion}",
+ "minor": "${parsedVersion.minorVersion}",
+ "patch": "${parsedVersion.incrementalVersion}",
+ "qualifier": "${parsedVersion.qualifier}",
+ "build": "${parsedVersion.buildNumber}"
+ }
+}
diff --git a/deploy/docker/build/service/src/main/build/Dockerfile b/deploy/docker/build/service/src/main/build/Dockerfile
index 1a8bbe2ce3..b1f8c18f8d 100644
--- a/deploy/docker/build/service/src/main/build/Dockerfile
+++ b/deploy/docker/build/service/src/main/build/Dockerfile
@@ -13,7 +13,8 @@ RUN set -eux \
&& chown -RL worker:worker /tmp \
&& rm \
tomcat/webapps/alfresco/WEB-INF/lib/jsr305-* \
- tomcat/webapps/alfresco/WEB-INF/lib/spring-security-*
+ tomcat/webapps/alfresco/WEB-INF/lib/spring-security-* \
+ tomcat/webapps/alfresco/WEB-INF/lib/oauth2-oidc-sdk-*
COPY --chown=worker:worker artifacts/edu_sharing-community-repository-backend-tomcat-${org.edu_sharing:edu_sharing-community-repository-backend-tomcat:jar.version}.jar tomcat/lib/
COPY --chown=worker:worker webapp/*.war tomcat/webapps/edu-sharing.war
diff --git a/deploy/docker/build/service/src/main/build/assets/entrypoint.sh b/deploy/docker/build/service/src/main/build/assets/entrypoint.sh
index 0c79b35ebd..2dd05c037a 100755
--- a/deploy/docker/build/service/src/main/build/assets/entrypoint.sh
+++ b/deploy/docker/build/service/src/main/build/assets/entrypoint.sh
@@ -37,6 +37,8 @@ my_home_auth_external_login_provider_target_url="${REPOSITORY_SERVICE_HOME_AUTH_
my_home_provider="${REPOSITORY_SERVICE_HOME_PROVIDER:-}"
my_home_url_dynamic="${REPOSITORY_SERVICE_HOME_URL_DYNAMIC:-}"
my_home_cookie_attr="${REPOSITORY_SERVICE_HOME_COOKIE_ATTRIBUTES:-}"
+my_home_custom_html_headers="${REPOSITORY_SERVICE_HOME_CUSTOM_HTML_HEADERS:-}"
+
my_allow_origin="${REPOSITORY_SERVICE_ALLOW_ORIGIN:-}"
if [[ ! -z "$my_allow_origin" ]]; then
my_allow_origin=",${my_allow_origin}"
@@ -129,38 +131,38 @@ alfExt="tomcat/shared/classes/alfresco/extension"
[[ -n "${cache_host}" && -n "${cache_port}" ]] && {
- until wait-for-it "${cache_host}:${cache_port}" -t 3; do sleep 1; done
+ until wait-for-it "${cache_host}:${cache_port}" -t 3; do sleep 1; done
- [[ "${cache_cluster}" == "true" ]] && {
- until [[ $(redis-cli --cluster info "${cache_host}" "${cache_port}" | grep '[OK]' | cut -d ' ' -f5) -gt 1 ]]; do
- echo >&2 "Waiting for ${cache_host} ..."
- sleep 3
- done
- }
+ [[ "${cache_cluster}" == "true" ]] && {
+ until [[ $(redis-cli --cluster info "${cache_host}" "${cache_port}" | grep '[OK]' | cut -d ' ' -f5) -gt 1 ]]; do
+ echo >&2 "Waiting for ${cache_host} ..."
+ sleep 3
+ done
+ }
}
until wait-for-it "${repository_database_host}:${repository_database_port}" -t 3; do sleep 1; done
until PGPASSWORD="${repository_database_pass}" \
- psql -h "${repository_database_host}" -p "${repository_database_port}" -U "${repository_database_user}" -d "${repository_database_name}" -c '\q'; do
- echo >&2 "Waiting for ${repository_database_host} ..."
- sleep 3
+ psql -h "${repository_database_host}" -p "${repository_database_port}" -U "${repository_database_user}" -d "${repository_database_name}" -c '\q'; do
+ echo >&2 "Waiting for ${repository_database_host} ..."
+ sleep 3
done
# jodconverter
[[ -n "${repository_transform_host}" && -n "${repository_transform_port}" ]] && {
- until wait-for-it "${repository_transform_host}:${repository_transform_port}" -t 3; do sleep 1; done
+ until wait-for-it "${repository_transform_host}:${repository_transform_port}" -t 3; do sleep 1; done
}
# core aio transformer
[[ -n "${repository_transform_aio_host}" && -n "${repository_transform_aio_port}" ]] && {
- until wait-for-it "${repository_transform_aio_host}:${repository_transform_aio_port}" -t 3; do sleep 1; done
+ until wait-for-it "${repository_transform_aio_host}:${repository_transform_aio_port}" -t 3; do sleep 1; done
}
# edu-sharing custom transformer
[[ -n "${repository_transform_es_host}" && -n "${repository_transform_es_port}" ]] && {
- until wait-for-it "${repository_transform_es_host}:${repository_transform_es_port}" -t 3; do sleep 1; done
+ until wait-for-it "${repository_transform_es_host}:${repository_transform_es_port}" -t 3; do sleep 1; done
}
### config #############################################################################################################
@@ -169,24 +171,32 @@ done
cp "${eduCConfX}" "${eduCConf}"
}
-configs=(cluster node)
+if [[ -f tomcat/shared/classes/config/defaults/project-version.json ]]; then
+ versionFile="tomcat/shared/classes/config/defaults/project-version.json"
+else
+ versionFile="tomcat/shared/classes/config/defaults/repository-version.json"
+fi
+
+configs=(cluster node)
for config in "${configs[@]}"; do
- if [[ ! -f tomcat/shared/classes/config/$config/version.json ]]; then
- mkdir -p tomcat/shared/classes/config/$config
- for jar in tomcat/shared/assets/$config/*.jar; do
- if [[ -f $jar ]] ; then
+ if [[ ! -f tomcat/shared/classes/config/$config/version.json ]]; then
+ mkdir -p tomcat/shared/classes/config/$config
+ for jar in tomcat/shared/assets/$config/*.jar; do
+ if [[ -f $jar ]]; then
unzip -o $jar -d tomcat/shared/classes/config/$config -x 'META-INF/*'
- fi
- done
- cp tomcat/webapps/edu-sharing/WEB-INF/classes/version.json tomcat/shared/classes/config/$config/version.json
- cp tomcat/shared/classes/config/$config/version.json tomcat/shared/classes/config/$config/version.json.$(date +%d-%m-%Y_%H-%M-%S )
- else
- cmp -s tomcat/webapps/edu-sharing/WEB-INF/classes/version.json tomcat/shared/classes/config/$config/version.json || {
- cp tomcat/webapps/edu-sharing/WEB-INF/classes/version.json tomcat/shared/classes/config/$config/version.json
- cp tomcat/shared/classes/config/$config/version.json tomcat/shared/classes/config/$config/version.json.$(date +%d-%m-%Y_%H-%M-%S )
- }
- fi
+ fi
+ done
+
+ cp "${versionFile}" tomcat/shared/classes/config/$config/version.json
+ cp "${versionFile}" tomcat/shared/classes/config/$config/version.json.$(date +%d-%m-%Y_%H-%M-%S)
+
+ else
+ cmp -s "${versionFile}" tomcat/shared/classes/config/$config/version.json || {
+ cp "${versionFile}" tomcat/shared/classes/config/$config/version.json
+ cp "${versionFile}" tomcat/shared/classes/config/$config/version.json.$(date +%d-%m-%Y_%H-%M-%S)
+ }
+ fi
done
reinstall.sh
@@ -207,14 +217,13 @@ export CATALINA_OPTS="-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xe
export CATALINA_OPTS="-Dhazelcast.ignoreXxeProtectionFailures=true $CATALINA_OPTS"
export CATALINA_OPTS="--add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED $CATALINA_OPTS"
-
xmlstarlet ed -L \
- -d '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]/@hostConfigClass' \
- -i '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]' -t attr -n 'hostConfigClass' -v 'org.edu_sharing.catalina.startup.OrderedHostConfig' \
- ${catSConf}
+ -d '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]/@hostConfigClass' \
+ -i '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]' -t attr -n 'hostConfigClass' -v 'org.edu_sharing.catalina.startup.OrderedHostConfig' \
+ ${catSConf}
xmlstarlet ed -L \
- -d '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]/Valve[@className="org.apache.catalina.valves.ErrorReportValve"]' \
+ -d '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]/Valve[@className="org.apache.catalina.valves.ErrorReportValve"]' \
-s '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]' -t elem -n 'Valve' -v '' \
--var valve '$prev' \
-i '$valve' -t attr -n "className" -v "org.apache.catalina.valves.ErrorReportValve" \
@@ -223,84 +232,84 @@ xmlstarlet ed -L \
${catSConf}
xmlstarlet ed -L \
- -d '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]/Valve[@className="org.apache.catalina.valves.AccessLogValve"]' \
- ${catSConf}
+ -d '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]/Valve[@className="org.apache.catalina.valves.AccessLogValve"]' \
+ ${catSConf}
[[ -n $my_http_jvmroute ]] && {
- xmlstarlet ed -L \
- -i '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]]' -t attr -n 'jvmRoute' -v "${my_http_jvmroute}" \
- ${catSConf}
+ xmlstarlet ed -L \
+ -i '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]]' -t attr -n 'jvmRoute' -v "${my_http_jvmroute}" \
+ ${catSConf}
}
[[ -n $my_http_accesslog_enabled ]] && {
- xmlstarlet ed -L \
- -s '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]' -t elem -n 'Valve' -v '' \
- --var valve '$prev' \
- -i '$valve' -t attr -n "className" -v "org.edu_sharing.catalina.valves.StdoutAccessLogValve" \
- -i '$valve' -t attr -n "pattern" -v "%h %l %u %t "%r" %s %b" \
- ${catSConf}
+ xmlstarlet ed -L \
+ -s '/Server/Service[@name="Catalina"]/Engine[@name="Catalina"]/Host[@name="localhost"]' -t elem -n 'Valve' -v '' \
+ --var valve '$prev' \
+ -i '$valve' -t attr -n "className" -v "org.edu_sharing.catalina.valves.StdoutAccessLogValve" \
+ -i '$valve' -t attr -n "pattern" -v "%h %l %u %t "%r" %s %b" \
+ ${catSConf}
}
xmlstarlet ed -L \
- -d '/Server/Service[@name="Catalina"]/Connector' \
- -s '/Server/Service[@name="Catalina"]' -t elem -n 'Connector' -v '' \
- --var internal '$prev' \
- -i '$internal' -t attr -n "address" -v "${my_bind}" \
- -i '$internal' -t attr -n "port" -v "8080" \
- -i '$internal' -t attr -n "scheme" -v "http" \
- -i '$internal' -t attr -n "protocol" -v "org.apache.coyote.http11.Http11NioProtocol" \
- -i '$internal' -t attr -n "connectionTimeout" -v "${my_wait_internal}" \
- -i '$internal' -t attr -n "maxThreads" -v "${my_pool_internal}" \
- -s '/Server/Service[@name="Catalina"]' -t elem -n 'Connector' -v '' \
- --var external1 '$prev' \
- -i '$external1' -t attr -n "address" -v "${my_bind}" \
- -i '$external1' -t attr -n "port" -v "8081" \
- -i '$external1' -t attr -n "scheme" -v "${my_prot_external}" \
- -i '$external1' -t attr -n "protocol" -v "org.apache.coyote.http11.Http11NioProtocol" \
- -i '$external1' -t attr -n "connectionTimeout" -v "${my_wait_external}" \
- -i '$external1' -t attr -n "maxThreads" -v "${my_pool_external}" \
- -s '/Server/Service[@name="Catalina"]' -t elem -n 'Connector' -v '' \
- --var external2 '$prev' \
- -i '$external2' -t attr -n "address" -v "${my_bind}" \
- -i '$external2' -t attr -n "port" -v "8009" \
- -i '$external2' -t attr -n "scheme" -v "${my_prot_external}" \
- -i '$external2' -t attr -n "protocol" -v "org.apache.coyote.ajp.AjpNioProtocol" \
- -i '$external2' -t attr -n "URIEncoding" -v "UTF-8" \
- -i '$external2' -t attr -n "connectionTimeout" -v "${my_wait_external}" \
- -i '$external2' -t attr -n "maxThreads" -v "${my_pool_external}" \
- -i '$external2' -t attr -n "secretRequired" -v "false" \
- -i '$external2' -t attr -n "tomcatAuthentication" -v "false" \
- -i '$external2' -t attr -n "allowedRequestAttributesPattern" -v ".*" \
- -i '$external2' -t attr -n "packetSize" -v "${my_proxy_buffer_size}" \
- ${catSConf}
+ -d '/Server/Service[@name="Catalina"]/Connector' \
+ -s '/Server/Service[@name="Catalina"]' -t elem -n 'Connector' -v '' \
+ --var internal '$prev' \
+ -i '$internal' -t attr -n "address" -v "${my_bind}" \
+ -i '$internal' -t attr -n "port" -v "8080" \
+ -i '$internal' -t attr -n "scheme" -v "http" \
+ -i '$internal' -t attr -n "protocol" -v "org.apache.coyote.http11.Http11NioProtocol" \
+ -i '$internal' -t attr -n "connectionTimeout" -v "${my_wait_internal}" \
+ -i '$internal' -t attr -n "maxThreads" -v "${my_pool_internal}" \
+ -s '/Server/Service[@name="Catalina"]' -t elem -n 'Connector' -v '' \
+ --var external1 '$prev' \
+ -i '$external1' -t attr -n "address" -v "${my_bind}" \
+ -i '$external1' -t attr -n "port" -v "8081" \
+ -i '$external1' -t attr -n "scheme" -v "${my_prot_external}" \
+ -i '$external1' -t attr -n "protocol" -v "org.apache.coyote.http11.Http11NioProtocol" \
+ -i '$external1' -t attr -n "connectionTimeout" -v "${my_wait_external}" \
+ -i '$external1' -t attr -n "maxThreads" -v "${my_pool_external}" \
+ -s '/Server/Service[@name="Catalina"]' -t elem -n 'Connector' -v '' \
+ --var external2 '$prev' \
+ -i '$external2' -t attr -n "address" -v "${my_bind}" \
+ -i '$external2' -t attr -n "port" -v "8009" \
+ -i '$external2' -t attr -n "scheme" -v "${my_prot_external}" \
+ -i '$external2' -t attr -n "protocol" -v "org.apache.coyote.ajp.AjpNioProtocol" \
+ -i '$external2' -t attr -n "URIEncoding" -v "UTF-8" \
+ -i '$external2' -t attr -n "connectionTimeout" -v "${my_wait_external}" \
+ -i '$external2' -t attr -n "maxThreads" -v "${my_pool_external}" \
+ -i '$external2' -t attr -n "secretRequired" -v "false" \
+ -i '$external2' -t attr -n "tomcatAuthentication" -v "false" \
+ -i '$external2' -t attr -n "allowedRequestAttributesPattern" -v ".*" \
+ -i '$external2' -t attr -n "packetSize" -v "${my_proxy_buffer_size}" \
+ ${catSConf}
[[ -n "${cache_host}" && -n "${cache_port}" ]] && {
- xmlstarlet ed -L \
- -d '/Context/Manager[@className="org.redisson.tomcat.RedissonSessionManager"]' \
- -s '/Context' -t elem -n "Manager" -v "" \
- --var redis '$prev' \
- -i '$redis' -t attr -n "className" -v "org.redisson.tomcat.RedissonSessionManager" \
- -i '$redis' -t attr -n "configPath" -v "tomcat/conf/redisson.yaml" \
- -i '$redis' -t attr -n "readMode" -v "REDIS" \
- -i '$redis' -t attr -n "updateMode" -v "DEFAULT" \
- -i '$redis' -t attr -n "broadcastSessionEvents" -v "false" \
- -i '$redis' -t attr -n "broadcastSessionUpdates" -v "false" \
- ${catCConf}
-
- if [[ "${cache_cluster}" == "true" ]] ; then
- {
- echo "clusterServersConfig:"
- echo " nodeAddresses:"
- echo " - \"redis://${cache_host}:${cache_port}\""
- } >> tomcat/conf/redisson.yaml
- else
- {
- echo "singleServerConfig:"
- echo " address: \"redis://${CACHE_HOST}:${CACHE_PORT}\""
- echo " database: ${cache_database}"
- } >> tomcat/conf/redisson.yaml
- fi
- echo "codec: ! {}" >> tomcat/conf/redisson.yaml
+ xmlstarlet ed -L \
+ -d '/Context/Manager[@className="org.redisson.tomcat.RedissonSessionManager"]' \
+ -s '/Context' -t elem -n "Manager" -v "" \
+ --var redis '$prev' \
+ -i '$redis' -t attr -n "className" -v "org.redisson.tomcat.RedissonSessionManager" \
+ -i '$redis' -t attr -n "configPath" -v "tomcat/conf/redisson.yaml" \
+ -i '$redis' -t attr -n "readMode" -v "REDIS" \
+ -i '$redis' -t attr -n "updateMode" -v "DEFAULT" \
+ -i '$redis' -t attr -n "broadcastSessionEvents" -v "false" \
+ -i '$redis' -t attr -n "broadcastSessionUpdates" -v "false" \
+ ${catCConf}
+
+ if [[ "${cache_cluster}" == "true" ]]; then
+ {
+ echo "clusterServersConfig:"
+ echo " nodeAddresses:"
+ echo " - \"redis://${cache_host}:${cache_port}\""
+ } >>tomcat/conf/redisson.yaml
+ else
+ {
+ echo "singleServerConfig:"
+ echo " address: \"redis://${CACHE_HOST}:${CACHE_PORT}\""
+ echo " database: ${cache_database}"
+ } >>tomcat/conf/redisson.yaml
+ fi
+ echo "codec: ! {}" >>tomcat/conf/redisson.yaml
}
### Alfresco platform ##################################################################################################
@@ -414,11 +423,11 @@ sed -i -r 's|^[#]*\s*localTransform\.core-aio\.url=.*|localTransform.core-aio.ur
grep -q '^[#]*\s*localTransform\.core-aio\.url=' "${alfProps}" || echo "localTransform.core-aio.url=http://${repository_transform_aio_host}:${repository_transform_aio_port}/" >>"${alfProps}"
xmlstarlet ed -L \
- -s '_:web-app/_:filter[_:filter-name="X509AuthFilter"]' -t elem -n "init-param" -v '' \
- --var param '$prev' \
- -s '$param' -t elem -n "param-name" -v "allow-unauthenticated-solr-endpoint" \
- -s '$param' -t elem -n "param-value" -v "true" \
- ${catAlfWConf}
+ -s '_:web-app/_:filter[_:filter-name="X509AuthFilter"]' -t elem -n "init-param" -v '' \
+ --var param '$prev' \
+ -s '$param' -t elem -n "param-name" -v "allow-unauthenticated-solr-endpoint" \
+ -s '$param' -t elem -n "param-value" -v "true" \
+ ${catAlfWConf}
[[ -f ${catAlfLog} ]] && {
@@ -430,31 +439,43 @@ xmlstarlet ed -L \
my_origin="${my_prot_external}://${my_host_external}"
[[ $my_port_external != "80" && $my_port_external != "443" ]] && {
- my_origin="${my_origin}:${my_port_external}"
+ my_origin="${my_origin}:${my_port_external}"
}
xmlstarlet ed -L \
- -u '/properties/entry[@key="appid"]' -v "${my_home_appid}" \
- -u '/properties/entry[@key="authenticationwebservice"]' -v "${my_auth_external}" \
- -u '/properties/entry[@key="clientport"]' -v "${my_port_external}" \
- -u '/properties/entry[@key="clientprotocol"]' -v "${my_prot_external}" \
- -u '/properties/entry[@key="domain"]' -v "${my_host_external}" \
- -u '/properties/entry[@key="host"]' -v "${my_host_internal}" \
- -u '/properties/entry[@key="password"]' -v "${my_admin_pass}" \
- -u '/properties/entry[@key="port"]' -v "${my_port_internal}" \
- -u '/properties/entry[@key="allow_origin"]' -v "${my_origin},http://localhost:54361${my_allow_origin}" \
- ${homeProp}
+ -u '/properties/entry[@key="appid"]' -v "${my_home_appid}" \
+ -u '/properties/entry[@key="authenticationwebservice"]' -v "${my_auth_external}" \
+ -u '/properties/entry[@key="clientport"]' -v "${my_port_external}" \
+ -u '/properties/entry[@key="clientprotocol"]' -v "${my_prot_external}" \
+ -u '/properties/entry[@key="domain"]' -v "${my_host_external}" \
+ -u '/properties/entry[@key="host"]' -v "${my_host_internal}" \
+ -u '/properties/entry[@key="password"]' -v "${my_admin_pass}" \
+ -u '/properties/entry[@key="port"]' -v "${my_port_internal}" \
+ -u '/properties/entry[@key="allow_origin"]' -v "${my_origin},http://localhost:54361${my_allow_origin}" \
+ ${homeProp}
xmlstarlet ed -L \
-d '/properties/entry[@key="cookie_attributes"]' \
${homeProp}
[[ -n "${my_home_cookie_attr}" ]] && {
- xmlstarlet ed -L \
- -s '/properties' -t elem -n "entry" -v "${my_home_cookie_attr}" \
- --var entry '$prev' \
- -i '$entry' -t attr -n "key" -v "cookie_attributes" \
- ${homeProp}
+ xmlstarlet ed -L \
+ -s '/properties' -t elem -n "entry" -v "${my_home_cookie_attr}" \
+ --var entry '$prev' \
+ -i '$entry' -t attr -n "key" -v "cookie_attributes" \
+ ${homeProp}
+}
+
+xmlstarlet ed -L \
+ -d '/properties/entry[@key="custom_html_headers"]' \
+ ${homeProp}
+
+[[ -n "${my_home_custom_html_headers}" ]] && {
+ xmlstarlet ed -L \
+ -s '/properties' -t elem -n "entry" -v "${my_home_custom_html_headers}" \
+ --var entry '$prev' \
+ -i '$entry' -t attr -n "key" -v "custom_html_headers" \
+ ${homeProp}
}
xmlstarlet ed -L \
@@ -462,11 +483,11 @@ xmlstarlet ed -L \
${homeProp}
[[ -n "${my_guest_user}" ]] && {
- xmlstarlet ed -L \
- -s '/properties' -t elem -n "entry" -v "${my_guest_user}" \
- --var entry '$prev' \
- -i '$entry' -t attr -n "key" -v "guest_username" \
- ${homeProp}
+ xmlstarlet ed -L \
+ -s '/properties' -t elem -n "entry" -v "${my_guest_user}" \
+ --var entry '$prev' \
+ -i '$entry' -t attr -n "key" -v "guest_username" \
+ ${homeProp}
}
xmlstarlet ed -L \
@@ -474,72 +495,63 @@ xmlstarlet ed -L \
${homeProp}
[[ -n "${my_guest_pass}" ]] && {
- xmlstarlet ed -L \
- -s '/properties' -t elem -n "entry" -v "${my_guest_pass}" \
- --var entry '$prev' \
- -i '$entry' -t attr -n "key" -v "guest_password" \
- ${homeProp}
+ xmlstarlet ed -L \
+ -s '/properties' -t elem -n "entry" -v "${my_guest_pass}" \
+ --var entry '$prev' \
+ -i '$entry' -t attr -n "key" -v "guest_password" \
+ ${homeProp}
}
-xmlstarlet ed -L \
- -d '/properties/entry[@key="allowed_authentication_types"]' \
- ${homeProp}
-
[[ -n "${my_home_auth}" ]] && {
- xmlstarlet ed -L \
- -s '/properties' -t elem -n "entry" -v "${my_home_auth}" \
- --var entry '$prev' \
- -i '$entry' -t attr -n "key" -v "allowed_authentication_types" \
- ${homeProp}
- if [[ "${my_home_auth_external}" == "true" ]] ; then
- xmlstarlet ed -L \
- -s '/config/values' -t elem -n 'loginUrl' -v '' \
- -d '/config/values/loginUrl[position() != 1]' \
- -u '/config/values/loginUrl' -v "${my_home_auth_external_login}" \
- -s '/config/values' -t elem -n 'loginProvidersUrl' -v '' \
- -d '/config/values/loginProvidersUrl[position() != 1]' \
- -u '/config/values/loginProvidersUrl' -v "${my_home_auth_external_login_providers_url}" \
- -s '/config/values' -t elem -n 'loginProviderTargetUrl' -v '' \
- -d '/config/values/loginProviderTargetUrl[position() != 1]' \
- -u '/config/values/loginProviderTargetUrl' -v "${my_home_auth_external_login_provider_target_url}" \
- -s '/config/values' -t elem -n 'logout' -v '' \
- -d '/config/values/logout[position() != 1]' \
- -s '/config/values/logout' -t elem -n 'url' -v '' \
- -d '/config/values/logout/url[position() != 1]' \
- -u '/config/values/logout/url' -v "${my_home_auth_external_logout}" \
- -s '/config/values/logout' -t elem -n 'destroySession' -v '' \
- -d '/config/values/logout/destroySession[position() != 1]' \
- -u '/config/values/logout/destroySession' -v "${my_home_auth_external_logout_destroy_session}" \
- ${eduCConf}
-
- if [[ "${my_home_auth_external_logout_redirect}" == "true" ]] ; then
- xmlstarlet ed -L \
- -s '/config/values/logout' -t elem -n 'ajax' -v '' \
- -d '/config/values/logout/ajax[position() != 1]' \
- -u '/config/values/logout/ajax' -v 'true' \
- -s '/config/values/logout' -t elem -n 'next' -v '' \
- -d '/config/values/logout/next[position() != 1]' \
- -u '/config/values/logout/next' -v "${my_home_auth_external_logout_redirect_url}" \
- ${eduCConf}
- fi
+ if [[ "${my_home_auth_external}" == "true" ]]; then
+ xmlstarlet ed -L \
+ -s '/config/values' -t elem -n 'loginUrl' -v '' \
+ -d '/config/values/loginUrl[position() != 1]' \
+ -u '/config/values/loginUrl' -v "${my_home_auth_external_login}" \
+ -s '/config/values' -t elem -n 'loginProvidersUrl' -v '' \
+ -d '/config/values/loginProvidersUrl[position() != 1]' \
+ -u '/config/values/loginProvidersUrl' -v "${my_home_auth_external_login_providers_url}" \
+ -s '/config/values' -t elem -n 'loginProviderTargetUrl' -v '' \
+ -d '/config/values/loginProviderTargetUrl[position() != 1]' \
+ -u '/config/values/loginProviderTargetUrl' -v "${my_home_auth_external_login_provider_target_url}" \
+ -s '/config/values' -t elem -n 'logout' -v '' \
+ -d '/config/values/logout[position() != 1]' \
+ -s '/config/values/logout' -t elem -n 'url' -v '' \
+ -d '/config/values/logout/url[position() != 1]' \
+ -u '/config/values/logout/url' -v "${my_home_auth_external_logout}" \
+ -s '/config/values/logout' -t elem -n 'destroySession' -v '' \
+ -d '/config/values/logout/destroySession[position() != 1]' \
+ -u '/config/values/logout/destroySession' -v "${my_home_auth_external_logout_destroy_session}" \
+ ${eduCConf}
+
+ if [[ "${my_home_auth_external_logout_redirect}" == "true" ]]; then
+ xmlstarlet ed -L \
+ -s '/config/values/logout' -t elem -n 'ajax' -v '' \
+ -d '/config/values/logout/ajax[position() != 1]' \
+ -u '/config/values/logout/ajax' -v 'true' \
+ -s '/config/values/logout' -t elem -n 'next' -v '' \
+ -d '/config/values/logout/next[position() != 1]' \
+ -u '/config/values/logout/next' -v "${my_home_auth_external_logout_redirect_url}" \
+ ${eduCConf}
+ fi
else
- sed -i -r 's|||g' tomcat/webapps/edu-sharing/WEB-INF/web.xml
- xmlstarlet ed -L \
- -s '/config/values' -t elem -n 'loginUrl' -v '' \
- -d '/config/values/loginUrl[position() != 1]' \
- -u '/config/values/loginUrl' -v "${my_path_external}/shibboleth" \
- -s '/config/values' -t elem -n 'logout' -v '' \
- -d '/config/values/logout[position() != 1]' \
- -s '/config/values/logout' -t elem -n 'url' -v '' \
- -d '/config/values/logout/url[position() != 1]' \
- -u '/config/values/logout/url' -v "${my_path_external}/logout" \
- -s '/config/values/logout' -t elem -n 'destroySession' -v '' \
- -d '/config/values/logout/destroySession[position() != 1]' \
- -u '/config/values/logout/destroySession' -v 'false' \
- ${eduCConf}
- fi
+ sed -i -r 's|||g' tomcat/webapps/edu-sharing/WEB-INF/web.xml
+ xmlstarlet ed -L \
+ -s '/config/values' -t elem -n 'loginUrl' -v '' \
+ -d '/config/values/loginUrl[position() != 1]' \
+ -u '/config/values/loginUrl' -v "${my_path_external}/shibboleth" \
+ -s '/config/values' -t elem -n 'logout' -v '' \
+ -d '/config/values/logout[position() != 1]' \
+ -s '/config/values/logout' -t elem -n 'url' -v '' \
+ -d '/config/values/logout/url[position() != 1]' \
+ -u '/config/values/logout/url' -v "${my_path_external}/logout" \
+ -s '/config/values/logout' -t elem -n 'destroySession' -v '' \
+ -d '/config/values/logout/destroySession[position() != 1]' \
+ -u '/config/values/logout/destroySession' -v 'false' \
+ ${eduCConf}
+ fi
}
xmlstarlet ed -L \
@@ -547,11 +559,11 @@ xmlstarlet ed -L \
${homeProp}
[[ -n "${my_home_provider}" ]] && {
- xmlstarlet ed -L \
- -s '/properties' -t elem -n "entry" -v "${my_home_provider}" \
- --var entry '$prev' \
- -i '$entry' -t attr -n "key" -v "remote_provider" \
- ${homeProp}
+ xmlstarlet ed -L \
+ -s '/properties' -t elem -n "entry" -v "${my_home_provider}" \
+ --var entry '$prev' \
+ -i '$entry' -t attr -n "key" -v "remote_provider" \
+ ${homeProp}
}
[[ -n "${my_home_url_dynamic}" ]] && {
@@ -567,207 +579,207 @@ xmlstarlet ed -L \
hocon -f ${eduSConf} unset "repository.mail.from"
}
[[ -n "${my_mail_from}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.from" '"'"${my_mail_from}"'"'
+ hocon -f ${eduSConf} set "repository.mail.from" '"'"${my_mail_from}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.mail.addReplyTo" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.mail.addReplyTo"
}
[[ -n "${my_mail_addreplyto}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.addReplyTo" '"'"${my_mail_addreplyto}"'"'
+ hocon -f ${eduSConf} set "repository.mail.addReplyTo" '"'"${my_mail_addreplyto}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.mail.register.receiver" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.mail.register.receiver"
}
[[ -n "${my_mail_register_receiver}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.register.receiver" '"'"${my_mail_register_receiver}"'"'
+ hocon -f ${eduSConf} set "repository.mail.register.receiver" '"'"${my_mail_register_receiver}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.mail.report.receivers" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.mail.report.receivers"
}
[[ -n "${my_mail_report_receiver}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.report.receivers" "[\"${my_mail_report_receiver//,/\",\"}\"]"
+ hocon -f ${eduSConf} set "repository.mail.report.receivers" "[\"${my_mail_report_receiver//,/\",\"}\"]"
}
[[ $(hocon -f ${eduSConf} get "repository.mail.server.smtp.host" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.mail.server.smtp.host"
}
[[ -n "${my_mail_server_smtp_host}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.server.smtp.host" '"'"${my_mail_server_smtp_host}"'"'
+ hocon -f ${eduSConf} set "repository.mail.server.smtp.host" '"'"${my_mail_server_smtp_host}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.mail.server.smtp.port" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.mail.server.smtp.port"
}
[[ -n "${my_mail_server_smtp_port}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.server.smtp.port" '"'"${my_mail_server_smtp_port}"'"'
+ hocon -f ${eduSConf} set "repository.mail.server.smtp.port" '"'"${my_mail_server_smtp_port}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.mail.server.smtp.username" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.mail.server.smtp.username"
}
[[ -n "${my_mail_server_smtp_username}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.server.smtp.username" '"'"${my_mail_server_smtp_username}"'"'
+ hocon -f ${eduSConf} set "repository.mail.server.smtp.username" '"'"${my_mail_server_smtp_username}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.mail.server.smtp.password" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.mail.server.smtp.password"
}
[[ -n "${my_mail_server_smtp_password}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.server.smtp.password" '"'"${my_mail_server_smtp_password}"'"'
+ hocon -f ${eduSConf} set "repository.mail.server.smtp.password" '"'"${my_mail_server_smtp_password}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.mail.server.smtp.authtype" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.mail.server.smtp.authtype"
}
[[ -n "${my_mail_server_smtp_authtype}" ]] && {
- hocon -f ${eduSConf} set "repository.mail.server.smtp.authtype" '"'"${my_mail_server_smtp_authtype}"'"'
+ hocon -f ${eduSConf} set "repository.mail.server.smtp.authtype" '"'"${my_mail_server_smtp_authtype}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.httpclient.disableSNI4Hosts" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.httpclient.disableSNI4Hosts"
}
[[ -n "${my_http_client_disablesni4hosts}" ]] && {
- hocon -f ${eduSConf} set "repository.httpclient.disableSNI4Hosts" '"'"${my_http_client_disablesni4hosts}"'"'
+ hocon -f ${eduSConf} set "repository.httpclient.disableSNI4Hosts" '"'"${my_http_client_disablesni4hosts}"'"'
}
[[ $(hocon -f ${eduSConf} get "repository.httpclient.proxy.host" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.httpclient.proxy.host"
}
[[ -n "${my_http_client_proxy_host}" ]] && {
- hocon -f ${eduSConf} set "repository.httpclient.proxy.host" '"'"${my_http_client_proxy_host}"'"'
+ hocon -f ${eduSConf} set "repository.httpclient.proxy.host" '"'"${my_http_client_proxy_host}"'"'
}
[[ -n "${my_http_client_proxy_nonproxyhosts}" ]] && {
- export CATALINA_OPTS="-Dhttp.nonProxyHosts=\"${my_http_client_proxy_nonproxyhosts//,/|}\" $CATALINA_OPTS"
- export CATALINA_OPTS="-Dhttps.nonProxyHosts=\"${my_http_client_proxy_nonproxyhosts//,/|}\" $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttp.nonProxyHosts=\"${my_http_client_proxy_nonproxyhosts//,/|}\" $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttps.nonProxyHosts=\"${my_http_client_proxy_nonproxyhosts//,/|}\" $CATALINA_OPTS"
}
[[ $(hocon -f ${eduSConf} get "repository.httpclient.proxy.nonproxyhosts" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.httpclient.proxy.nonproxyhosts"
}
[[ -n "${my_http_client_proxy_nonproxyhosts}" ]] && {
- hocon -f ${eduSConf} set "repository.httpclient.proxy.nonproxyhosts" '"'"${my_http_client_proxy_nonproxyhosts}"'"'
+ hocon -f ${eduSConf} set "repository.httpclient.proxy.nonproxyhosts" '"'"${my_http_client_proxy_nonproxyhosts}"'"'
}
[[ -n "${my_http_client_proxy_proxyhost}" ]] && {
- export CATALINA_OPTS="-Dhttp.proxyHost=${my_http_client_proxy_proxyhost} $CATALINA_OPTS"
- export CATALINA_OPTS="-Dhttps.proxyHost=${my_http_client_proxy_proxyhost} $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttp.proxyHost=${my_http_client_proxy_proxyhost} $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttps.proxyHost=${my_http_client_proxy_proxyhost} $CATALINA_OPTS"
}
[[ $(hocon -f ${eduSConf} get "repository.httpclient.proxy.proxyhost" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.httpclient.proxy.proxyhost"
}
[[ -n "${my_http_client_proxy_proxyhost}" ]] && {
- hocon -f ${eduSConf} set "repository.httpclient.proxy.proxyhost" '"'"${my_http_client_proxy_proxyhost}"'"'
+ hocon -f ${eduSConf} set "repository.httpclient.proxy.proxyhost" '"'"${my_http_client_proxy_proxyhost}"'"'
}
[[ -n "${my_http_client_proxy_proxypass}" ]] && {
- export CATALINA_OPTS="-Dhttp.proxyPass=${my_http_client_proxy_proxypass} $CATALINA_OPTS"
- export CATALINA_OPTS="-Dhttps.proxyPass=${my_http_client_proxy_proxypass} $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttp.proxyPass=${my_http_client_proxy_proxypass} $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttps.proxyPass=${my_http_client_proxy_proxypass} $CATALINA_OPTS"
}
[[ $(hocon -f ${eduSConf} get "repository.httpclient.proxy.proxypass" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.httpclient.proxy.proxypass"
}
[[ -n "${my_http_client_proxy_proxypass}" ]] && {
- hocon -f ${eduSConf} set "repository.httpclient.proxy.proxypass" '"'"${my_http_client_proxy_proxypass}"'"'
+ hocon -f ${eduSConf} set "repository.httpclient.proxy.proxypass" '"'"${my_http_client_proxy_proxypass}"'"'
}
[[ -n "${my_http_client_proxy_proxyport}" ]] && {
- export CATALINA_OPTS="-Dhttp.proxyPort=${my_http_client_proxy_proxyport} $CATALINA_OPTS"
- export CATALINA_OPTS="-Dhttps.proxyPort=${my_http_client_proxy_proxyport} $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttp.proxyPort=${my_http_client_proxy_proxyport} $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttps.proxyPort=${my_http_client_proxy_proxyport} $CATALINA_OPTS"
}
[[ $(hocon -f ${eduSConf} get "repository.httpclient.proxy.proxyport" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.httpclient.proxy.proxyport"
}
[[ -n "${my_http_client_proxy_proxyport}" ]] && {
- hocon -f ${eduSConf} set "repository.httpclient.proxy.proxyport" '"'"${my_http_client_proxy_proxyport}"'"'
+ hocon -f ${eduSConf} set "repository.httpclient.proxy.proxyport" '"'"${my_http_client_proxy_proxyport}"'"'
}
[[ -n "${my_http_client_proxy_proxyuser}" ]] && {
- export CATALINA_OPTS="-Dhttp.proxyUser=${my_http_client_proxy_proxyuser} $CATALINA_OPTS"
- export CATALINA_OPTS="-Dhttps.proxyUser=${my_http_client_proxy_proxyuser} $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttp.proxyUser=${my_http_client_proxy_proxyuser} $CATALINA_OPTS"
+ export CATALINA_OPTS="-Dhttps.proxyUser=${my_http_client_proxy_proxyuser} $CATALINA_OPTS"
}
[[ $(hocon -f ${eduSConf} get "repository.httpclient.proxy.proxyuser" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "repository.httpclient.proxy.proxyuser"
}
[[ -n "${my_http_client_proxy_proxyuser}" ]] && {
- hocon -f ${eduSConf} set "repository.httpclient.proxy.proxyuser" '"'"${my_http_client_proxy_proxyuser}"'"'
+ hocon -f ${eduSConf} set "repository.httpclient.proxy.proxyuser" '"'"${my_http_client_proxy_proxyuser}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.default-src" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.default-src"
}
[[ -n "${my_http_server_csp_default}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.default-src" '"'"${my_http_server_csp_default}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.default-src" '"'"${my_http_server_csp_default}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.connect-src" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.connect-src"
}
[[ -n "${my_http_server_csp_connect}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.connect-src" '"'"${my_http_server_csp_connect}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.connect-src" '"'"${my_http_server_csp_connect}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.img-src" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.img-src"
}
[[ -n "${my_http_server_csp_img}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.img-src" '"'"${my_http_server_csp_img}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.img-src" '"'"${my_http_server_csp_img}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.script-src" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.script-src"
}
[[ -n "${my_http_server_csp_script}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.script-src" '"'"${my_http_server_csp_script}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.script-src" '"'"${my_http_server_csp_script}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.font-src" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.font-src"
}
[[ -n "${my_http_server_csp_font}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.font-src" '"'"${my_http_server_csp_font}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.font-src" '"'"${my_http_server_csp_font}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.frame-ancestors" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.frame-ancestors"
}
[[ -n "${my_http_server_csp_frame}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.frame-ancestors" '"'"${my_http_server_csp_frame}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.frame-ancestors" '"'"${my_http_server_csp_frame}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.media-src" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.media-src"
}
[[ -n "${my_http_server_csp_media}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.media-src" '"'"${my_http_server_csp_media}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.media-src" '"'"${my_http_server_csp_media}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.object-src" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.object-src"
}
[[ -n "${my_http_server_csp_object}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.object-src" '"'"${my_http_server_csp_object}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.object-src" '"'"${my_http_server_csp_object}"'"'
}
[[ $(hocon -f ${eduSConf} get "angular.headers.Content-Security-Policy.style-src" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "angular.headers.Content-Security-Policy.style-src"
}
[[ -n "${my_http_server_csp_style}" ]] && {
- hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.style-src" '"'"${my_http_server_csp_style}"'"'
+ hocon -f ${eduSConf} set "angular.headers.Content-Security-Policy.style-src" '"'"${my_http_server_csp_style}"'"'
}
[[ $(hocon -f ${eduSConf} get "jobs.primaryHostname" 2>/dev/null) ]] && {
hocon -f ${eduSConf} unset "jobs.primaryHostname"
}
[[ -n "${my_jobs_primary_hostname}" ]] && {
- hocon -f ${eduSConf} set "jobs.primaryHostname" '"'"${my_jobs_primary_hostname}"'"'
+ hocon -f ${eduSConf} set "jobs.primaryHostname" '"'"${my_jobs_primary_hostname}"'"'
}
# clean up empty lines in config after hocon commands
@@ -775,16 +787,16 @@ sed -i '/^[[:space:]]*$/d' ${eduSConf}
xmlstarlet ed -L \
-N x="http://java.sun.com/xml/ns/javaee" \
- -u '/x:web-app/x:session-config/x:session-timeout' -v "${my_http_server_session_timeout}" \
- ${catEduWConf}
+ -u '/x:web-app/x:session-config/x:session-timeout' -v "${my_http_server_session_timeout}" \
+ ${catEduWConf}
########################################################################################################################
# PLUGIN
for entrypoint in bin/plugins/plugin-*/entrypoint.sh; do
- [[ -f $entrypoint ]] && {
- source "$entrypoint" || exit 1
- }
+ [[ -f $entrypoint ]] && {
+ source "$entrypoint" || exit 1
+ }
done
########################################################################################################################
diff --git a/deploy/docker/compose/src/main/compose/1_repository-common.yml b/deploy/docker/compose/src/main/compose/1_repository-common.yml
index 3e3cec8858..492f1aaed6 100644
--- a/deploy/docker/compose/src/main/compose/1_repository-common.yml
+++ b/deploy/docker/compose/src/main/compose/1_repository-common.yml
@@ -103,6 +103,7 @@ services:
REPOSITORY_SERVICE_GUEST_PASS: "${REPOSITORY_SERVICE_GUEST_PASS:-}"
REPOSITORY_SERVICE_GUEST_USER: "${REPOSITORY_SERVICE_GUEST_USER:-}"
REPOSITORY_SERVICE_HOME_APPID: "${REPOSITORY_SERVICE_HOME_APPID:-${COMPOSE_PROJECT_NAME:-local}}"
+ REPOSITORY_SERVICE_HOME_CUSTOM_HTML_HEADERS: "${REPOSITORY_SERVICE_HOME_CUSTOM_HTML_HEADERS:-}"
REPOSITORY_SERVICE_HOME_AUTH: "${REPOSITORY_SERVICE_AUTH:-}"
REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL: "${REPOSITORY_SERVICE_AUTH_EXTERNAL:-false}"
REPOSITORY_SERVICE_HOME_AUTH_EXTERNAL_LOGIN: "${REPOSITORY_SERVICE_AUTH_EXTERNAL_LOGIN:-}"
diff --git a/deploy/docker/helm/search-solr/src/main/chart/templates/statefulset.yaml b/deploy/docker/helm/search-solr/src/main/chart/templates/statefulset.yaml
index d9b85a052e..8b9c740eb6 100644
--- a/deploy/docker/helm/search-solr/src/main/chart/templates/statefulset.yaml
+++ b/deploy/docker/helm/search-solr/src/main/chart/templates/statefulset.yaml
@@ -260,7 +260,7 @@ spec:
{{- if (default $.Values.global.cluster.storage.data.permission $.Values.persistence.data.permission) }}
initContainers:
- name: {{ include "edusharing_common_lib.names.name" $ }}-init-permission
- image: {{ include "edusharing_common_lib.images.common" $ }}{{ .Values.init.permission.image.name }}:{{ .Values.init.permission.image.tag }}
+ image: {{ include "edusharing_common_lib.images.common" $ }}{{ $.Values.init.permission.image.name }}:{{ $.Values.init.permission.image.tag }}
imagePullPolicy: {{ $.Values.global.image.pullPolicy }}
command:
- "/bin/bash"
@@ -319,8 +319,25 @@ spec:
{{- end }}
containers:
- name: {{ include "edusharing_common_lib.names.name" $ }}
- image: {{ include "edusharing_common_lib.images.common" $ }}{{ .Values.image.name }}:{{ .Values.image.tag }}
+ image: {{ include "edusharing_common_lib.images.common" $ }}{{ $.Values.image.name }}:{{ $.Values.image.tag }}
imagePullPolicy: {{ $.Values.global.image.pullPolicy }}
+ args:
+ - solr/solr/bin/solr
+ - start
+ - '-f'
+ - '-p'
+ - '8080'
+ {{- if or $.Values.config.metrics.enabled (default $.Values.global.debug $.Values.debug) }}
+ - '-a'
+ - >-
+ {{- if $.Values.config.metrics.enabled }}
+ -javaagent:/opt/alfresco/solr/agent/jmx_prometheus_javaagent.jar=9090:/opt/alfresco/solr/agent/jmx-exporter-config.yaml
+ {{- end }}
+ {{- if default $.Values.global.debug $.Values.debug }}
+ -agentlib:jdwp=transport=dt_socket,address=0.0.0.0:5005,server=y,suspend=n
+ {{- end }}
+ {{- end }}
+ - '-Dcreate.alfresco.defaults=alfresco,archive'
env:
- name: REPOSITORY_SEARCH_SOLR_CONFIG
value: | {{ .spec.config.override.application.common | nindent 12 }}
diff --git a/deploy/docker/helm/service/src/main/chart/README.md b/deploy/docker/helm/service/src/main/chart/README.md
index fbb611326e..1c99543609 100644
--- a/deploy/docker/helm/service/src/main/chart/README.md
+++ b/deploy/docker/helm/service/src/main/chart/README.md
@@ -48,6 +48,7 @@
| `service.port.gossip` | Set port for service gossip | `5701` |
| `service.port.metrics.api` | Set port for metrics API | `9090` |
| `service.port.metrics.proxy` | Set port for metrics proxy | `9091` |
+| `ingress.enabled` | Enable ingress | `true` |
| `ingress.annotations.kubernetes.io/ingress.class` | Set kubernetes ingress class name | `{"kubernetes.io/ingress.class":"nginx","nginx.ingress.kubernetes.io/affinity":"cookie","nginx.ingress.kubernetes.io/app-root":"/edu-sharing","nginx.ingress.kubernetes.io/proxy-body-size":"5g","nginx.ingress.kubernetes.io/proxy-connect-timeout":"60","nginx.ingress.kubernetes.io/proxy-read-timeout":"180","nginx.ingress.kubernetes.io/proxy-send-timeout":"180"}` |
| `ingress.annotations.nginx.ingress.kubernetes.io/affinity` | Set affinity on nginx ingress | `{"kubernetes.io/ingress.class":"nginx","nginx.ingress.kubernetes.io/affinity":"cookie","nginx.ingress.kubernetes.io/app-root":"/edu-sharing","nginx.ingress.kubernetes.io/proxy-body-size":"5g","nginx.ingress.kubernetes.io/proxy-connect-timeout":"60","nginx.ingress.kubernetes.io/proxy-read-timeout":"180","nginx.ingress.kubernetes.io/proxy-send-timeout":"180"}` |
| `ingress.annotations.nginx.ingress.kubernetes.io/app-root` | Set app-root on nginx ingress | `{"kubernetes.io/ingress.class":"nginx","nginx.ingress.kubernetes.io/affinity":"cookie","nginx.ingress.kubernetes.io/app-root":"/edu-sharing","nginx.ingress.kubernetes.io/proxy-body-size":"5g","nginx.ingress.kubernetes.io/proxy-connect-timeout":"60","nginx.ingress.kubernetes.io/proxy-read-timeout":"180","nginx.ingress.kubernetes.io/proxy-send-timeout":"180"}` |
@@ -78,6 +79,7 @@
| `config.cluster.enabled` | Enable clustering | `false` |
| `config.cluster.backup.count` | Set cluster backup count | `1` |
| `config.cluster.backup.read` | Set cluster backup as read | `false` |
+| `config.connector.accesslog` | Enable access log | `false` |
| `config.connector.external.threads` | Set external connector threads | `200` |
| `config.connector.external.timeout` | Set external connector timeout | `20000` |
| `config.connector.internal.threads` | Set internal connector threads | `200` |
@@ -104,6 +106,7 @@
| `config.home.appid` | Set home app id | `local` |
| `config.home.cookieAttributes` | Set home cookie attributes | `""` |
| `config.home.urlDynamic` | Set url_dynamic attribute | `false` |
+| `config.home.customHtmlHeaders` | Set home custom_html_headers attributes | `""` |
| `config.jvm.ram.minPercentage` | Set minimum memory in percentages | `75.0` |
| `config.jvm.ram.maxPercentage` | Set maximum memory in percentages | `75.0` |
| `config.metrics.enabled` | Enable metrics | `true` |
@@ -163,14 +166,23 @@
| `debug` | Enable debugging | `false` |
| `persistence.data.config.spec.accessModes` | Set access modes for persistent data | `["ReadWriteOnce"]` |
| `persistence.data.config.spec.resources.requests.storage` | Set storage request for persistent data | `1Gi` |
-| `persistence.share.config.create` | Create persistent share | `true` |
-| `persistence.share.config.spec.accessModes` | Set access modes for persistent share | `["ReadWriteMany"]` |
-| `persistence.share.config.spec.resources.requests.storage` | Set storage request for persistent share | `1Gi` |
+| `persistence.share.config.create` | Create persistent config share | `true` |
+| `persistence.share.config.type` | Set volume type of persistent config share | `persistentVolumeClaim:
+ claimName: {{ include "edusharing_repository_service.pvc.share.config" . }}
+` |
+| `persistence.share.config.spec.accessModes` | Set access modes for persistent config share | `["ReadWriteMany"]` |
+| `persistence.share.config.spec.resources.requests.storage` | Set storage request for persistent config share | `1Gi` |
| `persistence.share.data.create` | Create persistent data share | `true` |
+| `persistence.share.data.type` | Set volume type of persistent data share | `persistentVolumeClaim:
+ claimName: {{ include "edusharing_repository_service.pvc.share.data" . }}
+` |
| `persistence.share.data.spec.accessModes` | Set access modes for persistent data share | `["ReadWriteMany"]` |
| `persistence.share.data.spec.resources.requests.storage` | Set storage request for persistent data share | `5Gi` |
-| `persistence.share.safe.enabled` | Enable safe data share | `false` |
-| `persistence.share.safe.create` | Create safe data share | `true` |
+| `persistence.share.safe.enabled` | Enable persistent safe share | `false` |
+| `persistence.share.safe.create` | Create persistent safe share | `true` |
+| `persistence.share.safe.type` | Set volume type of persistent safe share | `persistentVolumeClaim:
+ claimName: {{ include "edusharing_repository_service.pvc.share.safe" . }}
+` |
| `persistence.share.safe.spec.accessModes` | Set access modes for persistent safe share | `["ReadWriteMany"]` |
| `persistence.share.safe.spec.resources.requests.storage` | Set storage request for persistent safe share | `5Gi` |
| `nodeAffinity` | Set node affinity | `{}` |
diff --git a/deploy/docker/helm/service/src/main/chart/templates/configmap-env.yaml b/deploy/docker/helm/service/src/main/chart/templates/configmap-env.yaml
index 1a69a8aa42..50d8b664e1 100644
--- a/deploy/docker/helm/service/src/main/chart/templates/configmap-env.yaml
+++ b/deploy/docker/helm/service/src/main/chart/templates/configmap-env.yaml
@@ -66,9 +66,11 @@ data:
REPOSITORY_SERVICE_HOME_URL_DYNAMIC: {{ .Values.config.home.urlDynamic | quote }}
REPOSITORY_SERVICE_HOME_AUTH: {{ if or .Values.config.oidc.enabled .Values.config.saml.enabled }}"shibboleth"{{ else }}""{{ end }}
REPOSITORY_SERVICE_HOME_COOKIE_ATTRIBUTES: {{ .Values.config.home.cookieAttributes | quote }}
+ REPOSITORY_SERVICE_HOME_CUSTOM_HTML_HEADERS: {{ .Values.config.home.customHtmlHeaders | quote }}
REPOSITORY_SERVICE_ALLOW_ORIGIN: "{{- join "," .Values.config.http.server.allowOrigin}}"
REPOSITORY_SERVICE_HOST_EXTERNAL: {{ .Values.ingress.hosts | first | quote }}
REPOSITORY_SERVICE_HOST_INTERNAL: {{ printf "%s.%s.svc.%s" (include "edusharing_common_lib.names.name" .) .Release.Namespace .Values.global.cluster.domain | quote }}
+ REPOSITORY_SERVICE_HTTP_ACCESSLOG_ENABLED: "{{ if .Values.config.connector.accesslog }}true{{ end }}"
REPOSITORY_SERVICE_HTTP_CLIENT_DISABLE_SNI4HOSTS: {{ .Values.config.http.client.disablesni4host | quote }}
REPOSITORY_SERVICE_HTTP_CLIENT_PROXY_HOST: {{ .Values.config.http.client.proxy.host | quote }}
REPOSITORY_SERVICE_HTTP_CLIENT_PROXY_NONPROXYHOSTS: "'{{- join "|" .Values.config.http.client.proxy.nonproxyhosts }}'"
diff --git a/deploy/docker/helm/service/src/main/chart/templates/configmap-file.yaml b/deploy/docker/helm/service/src/main/chart/templates/configmap-file.yaml
index da0d944cad..aac1227fae 100644
--- a/deploy/docker/helm/service/src/main/chart/templates/configmap-file.yaml
+++ b/deploy/docker/helm/service/src/main/chart/templates/configmap-file.yaml
@@ -50,7 +50,7 @@ data:
return (synth(200, "OK"));
}
- if (req.method == "POST" || req.method == "PUT" || req.method == "DELETE" || req.url ~ "/rest/") {
+ if (req.method == "POST" || req.method == "PUT" || req.method == "DELETE" || req.url ~ "/rest/" || req.url ~ "/webdav/") {
return (pass);
}
@@ -63,6 +63,10 @@ data:
}
}
+ sub vcl_pipe {
+ set bereq.http.Connection = "close";
+ }
+
sub vcl_hit {
if (obj.ttl >= 0s) {
return (deliver);
@@ -86,6 +90,9 @@ data:
set beresp.http.cache-control = "{{ .Values.proxy.config.cache.control }}, max-age={{ .Values.proxy.config.cache.ttl }}";
{{- end }}
return (deliver);
+ } else {
+ set beresp.ttl = 0s;
+ set beresp.http.Connection = "close";
}
}
diff --git a/deploy/docker/helm/service/src/main/chart/templates/ingress.yaml b/deploy/docker/helm/service/src/main/chart/templates/ingress.yaml
index dc06536c2b..dc39e6535e 100644
--- a/deploy/docker/helm/service/src/main/chart/templates/ingress.yaml
+++ b/deploy/docker/helm/service/src/main/chart/templates/ingress.yaml
@@ -1,4 +1,5 @@
{{- if not .Values.global.cluster.istio.enabled }}
+{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
@@ -58,4 +59,5 @@ spec:
number: {{ $.Values.service.port.api.external }}
{{- end }}
{{- end }}
+{{- end }}
{{- end }}
\ No newline at end of file
diff --git a/deploy/docker/helm/service/src/main/chart/templates/statefulset.yaml b/deploy/docker/helm/service/src/main/chart/templates/statefulset.yaml
index b2dbc6ece0..3c99f73119 100644
--- a/deploy/docker/helm/service/src/main/chart/templates/statefulset.yaml
+++ b/deploy/docker/helm/service/src/main/chart/templates/statefulset.yaml
@@ -431,15 +431,12 @@ spec:
{{- end }}
volumes:
- name: share-config
- persistentVolumeClaim:
- claimName: {{ include "edusharing_repository_service.pvc.share.config" . }}
+ {{ tpl .Values.persistence.share.config.type . | nindent 8 }}
- name: share-data
- persistentVolumeClaim:
- claimName: {{ include "edusharing_repository_service.pvc.share.data" . }}
+ {{ tpl .Values.persistence.share.data.type . | nindent 8 }}
{{- if .Values.persistence.share.safe.enabled }}
- name: share-safe
- persistentVolumeClaim:
- claimName: {{ include "edusharing_repository_service.pvc.share.safe" . }}
+ {{ tpl .Values.persistence.share.safe.type . | nindent 8 }}
{{- end }}
- name: file
configMap:
diff --git a/deploy/docker/helm/service/src/main/chart/values.yaml b/deploy/docker/helm/service/src/main/chart/values.yaml
index 4dfecff600..19eb503884 100644
--- a/deploy/docker/helm/service/src/main/chart/values.yaml
+++ b/deploy/docker/helm/service/src/main/chart/values.yaml
@@ -139,6 +139,9 @@ service:
ingress:
+ ## @param ingress.enabled Enable ingress
+ enabled: true
+
annotations:
## @param ingress.annotations.kubernetes.io/ingress.class Set kubernetes ingress class name
kubernetes.io/ingress.class: nginx
@@ -233,6 +236,9 @@ config:
connector:
+ ## @param config.connector.accesslog Enable access log
+ accesslog: false
+
external:
## @param config.connector.external.threads Set external connector threads
threads: 200
@@ -309,6 +315,8 @@ config:
cookieAttributes: ""
## @param config.home.urlDynamic Set url_dynamic attribute
urlDynamic: false
+ ## @param config.home.customHtmlHeaders Set home custom_html_headers attributes
+ customHtmlHeaders: ""
jvm:
ram:
@@ -488,18 +496,26 @@ persistence:
share:
config:
- ## @param persistence.share.config.create Create persistent share
+ ## @param persistence.share.config.create Create persistent config share
create: true
+ ## @param persistence.share.config.type Set volume type of persistent config share
+ type: |
+ persistentVolumeClaim:
+ claimName: {{ include "edusharing_repository_service.pvc.share.config" . }}
spec:
- ## @param persistence.share.config.spec.accessModes Set access modes for persistent share
+ ## @param persistence.share.config.spec.accessModes Set access modes for persistent config share
accessModes: [ "ReadWriteMany" ]
resources:
requests:
- ## @param persistence.share.config.spec.resources.requests.storage Set storage request for persistent share
+ ## @param persistence.share.config.spec.resources.requests.storage Set storage request for persistent config share
storage: 1Gi
data:
## @param persistence.share.data.create Create persistent data share
create: true
+ ## @param persistence.share.data.type Set volume type of persistent data share
+ type: |
+ persistentVolumeClaim:
+ claimName: {{ include "edusharing_repository_service.pvc.share.data" . }}
spec:
## @param persistence.share.data.spec.accessModes Set access modes for persistent data share
accessModes: [ "ReadWriteMany" ]
@@ -509,10 +525,14 @@ persistence:
storage: 5Gi
safe:
- ## @param persistence.share.safe.enabled Enable safe data share
+ ## @param persistence.share.safe.enabled Enable persistent safe share
enabled: false
- ## @param persistence.share.safe.create Create safe data share
+ ## @param persistence.share.safe.create Create persistent safe share
create: true
+ ## @param persistence.share.safe.type Set volume type of persistent safe share
+ type: |
+ persistentVolumeClaim:
+ claimName: {{ include "edusharing_repository_service.pvc.share.safe" . }}
spec:
## @param persistence.share.safe.spec.accessModes Set access modes for persistent safe share
accessModes: [ "ReadWriteMany" ]
diff --git a/pom.xml b/pom.xml
index 105872ca18..3fcbd74c45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,7 +53,7 @@
do not update to 6.2.2 cause it breaks openidconnect backchannel logout
https://github.com/spring-projects/spring-security/issues/14553
-->
- 6.2.4
+ 6.2.6
diff --git a/webapp/src/main/templates/WEB-INF/classes/version.json b/webapp/src/main/templates/WEB-INF/classes/repository-version.json
similarity index 100%
rename from webapp/src/main/templates/WEB-INF/classes/version.json
rename to webapp/src/main/templates/WEB-INF/classes/repository-version.json