+
version-control.auto-commit-settings-read-only-hint
-
diff --git a/ui-ngx/src/app/modules/home/components/vc/auto-commit-settings.component.ts b/ui-ngx/src/app/modules/home/components/vc/auto-commit-settings.component.ts
index fd100f6247..980d89db4f 100644
--- a/ui-ngx/src/app/modules/home/components/vc/auto-commit-settings.component.ts
+++ b/ui-ngx/src/app/modules/home/components/vc/auto-commit-settings.component.ts
@@ -23,8 +23,8 @@ import { AdminService } from '@core/http/admin.service';
import { AutoCommitSettings, AutoVersionCreateConfig } from '@shared/models/settings.models';
import { TranslateService } from '@ngx-translate/core';
import { DialogService } from '@core/services/dialog.service';
-import { catchError, mergeMap } from 'rxjs/operators';
-import { of } from 'rxjs';
+import { catchError, map, mergeMap } from 'rxjs/operators';
+import { Observable, of } from 'rxjs';
import { EntityTypeVersionCreateConfig, exportableEntityTypes } from '@shared/models/vc.models';
import { EntityType, entityTypeTranslations } from '@shared/models/entity-type.models';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@@ -41,6 +41,8 @@ export class AutoCommitSettingsComponent extends PageComponent implements OnInit
entityTypes = EntityType;
+ isReadOnly: Observable
;
+
constructor(protected store: Store,
private adminService: AdminService,
private dialogService: DialogService,
@@ -71,6 +73,7 @@ export class AutoCommitSettingsComponent extends PageComponent implements OnInit
this.autoCommitSettingsForm.setControl('entityTypes',
this.prepareEntityTypesFormArray(settings), {emitEvent: false});
});
+ this.isReadOnly = this.adminService.getRepositorySettingsInfo().pipe(map(settings => settings.readOnly));
}
entityTypesFormGroupArray(): FormGroup[] {
diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json
index 4ac224da55..f445a2c171 100644
--- a/ui-ngx/src/assets/locale/locale.constant-en_US.json
+++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json
@@ -3488,7 +3488,8 @@
"sync-strategy-overwrite-hint": "Creates or updates selected entities in the repository. All other repository entities are deleted.",
"device-credentials-conflict": "Failed to load the device with external id {{entityId}}
due to the same credentials are already present in the database for another device.
Please consider disabling the load credentials setting in the restore form.",
"missing-referenced-entity": "Failed to load the {{sourceEntityTypeName}} with external id {{sourceEntityId}}
because it references missing {{targetEntityTypeName}} with id {{targetEntityId}}.",
- "runtime-failed": "Failed: {{message}}"
+ "runtime-failed": "Failed: {{message}}",
+ "auto-commit-settings-read-only-hint": "Auto-commit feature doesn't work with enabled read-only option in Repository settings."
},
"widget": {
"widget-library": "Widgets Library",