mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
i18n admin strings
This commit is contained in:
parent
c09a116e56
commit
6968581e5b
2 changed files with 122 additions and 75 deletions
|
@ -37,64 +37,63 @@
|
|||
|
||||
{{#if isKeycloakProvider}}
|
||||
<div class="form-group">
|
||||
<label for="keycloak-url">Keycloak Server URL</label>
|
||||
<label for="keycloak-url">{{localize 'auth_keycloak_url'}}</label>
|
||||
{{focus-input id="keycloak-url" type="text" value=keycloakConfig.url class=(if KeycloakUrlError "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">e.g. http://localhost:8888/auth</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="keycloak-realm">Keycloak Realm</label>
|
||||
<label for="keycloak-realm">{{localize 'auth_keycloak_realm'}}</label>
|
||||
{{input id="keycloak-realm" type="text" value=keycloakConfig.realm class=(if KeycloakRealmError "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">e.g. main</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="keycloak-publicKey">Keycloak Realm Public Key</label>
|
||||
<label for="keycloak-publicKey">{{localize 'auth_keycloak_pk'}}</label>
|
||||
{{textarea id="keycloak-publicKey" type="text" value=keycloakConfig.publicKey rows=7 class=(if KeycloakPublicKeyError "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Copy the RSA Public Key from Realm Settings → Keys</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_keylcloak_pk_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="keycloak-clientId">Keycloak OIDC Client ID</label>
|
||||
<label for="keycloak-clientId">{{localize 'auth_keycloak_oidc'}}</label>
|
||||
{{input id="keycloak-clientId" type="text" value=keycloakConfig.clientId class=(if KeycloakClientIdError "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">e.g. account</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="keycloak-group">Keycloak Group ID (Optional)</label>
|
||||
<label for="keycloak-group">{{localize 'auth_keycloak_group'}}</label>
|
||||
{{input id="keycloak-group" type="text" value=keycloakConfig.group class="form-control"}}
|
||||
<small class="form-text text-muted">If you want to sync users in a particular Group (e.g. "Documize Community Users"), provide the Group ID (e.g. 511d8b61-1ec8-45f6-bc8d-5de64d54c9d2)</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_keycloak_group_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="keycloak-admin-user">Keycloak Username</label>
|
||||
<label for="keycloak-admin-user">{{localize 'auth_keycloak_username'}}</label>
|
||||
{{input id="keycloak-admin-user" type="text" value=keycloakConfig.adminUser class=(if KeycloakAdminUserError "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Used to connect with Keycloak and sync users with Documize (create user under Master Realm and assign 'view-users' role
|
||||
against Realm specified above)</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_keycloak_username_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="keycloak-admin-password">Keycloak Password</label>
|
||||
<label for="keycloak-admin-password">{{localize 'auth_keycloak_password'}}</label>
|
||||
{{input id="keycloak-admin-password" type="password" value=keycloakConfig.adminPassword class=(if KeycloakAdminPasswordError "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Used to connect with Keycloak and sync users with Documize</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_keycloak_password_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Disable Logout</label>
|
||||
<label>{{localize 'auth_disable_logout'}}</label>
|
||||
{{x-toggle value=keycloakConfig.disableLogout size="medium" theme="light" onToggle=(action (mut keycloakConfig.disableLogout))}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-defaultPermissionAddSpace">Can Create Spaces</label>
|
||||
<label for="ldap-defaultPermissionAddSpace">{{localize 'auth_role_space'}}</label>
|
||||
{{x-toggle value=keycloakConfig.defaultPermissionAddSpace size="medium" theme="light" onToggle=(action (mut keycloakConfig.defaultPermissionAddSpace))}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if isLDAPProvider}}
|
||||
<div class="form-group">
|
||||
<label for="ldap-host">LDAP Server</label>
|
||||
<label for="ldap-host">{{localize 'auth_ldap_server'}}</label>
|
||||
{{focus-input id="ldap-host" type="text" value=ldapConfig.serverHost class=(if ldapErrorServerHost "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">IP or host address, e.g. ldap.example.org, 127.0.0.1</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_server_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-port">LDAP Server Port</label>
|
||||
<label for="ldap-port">{{localize 'auth_ldap_port'}}</label>
|
||||
{{input id="ldap-port" type="number" value=ldapConfig.serverPort class=(if ldapErrorServerPort "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Port number, e.g. 389</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_port_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-encryption">Encryption</label>
|
||||
<label for="ldap-encryption">{{localize 'encryption'}}</label>
|
||||
<select onchange={{action "onLDAPEncryption" value="target.value"}} class="form-control">
|
||||
<option value={{constants.AuthProvider.EncryptionTypeNone}} selected={{is-equal ldapConfig.encryptionType constants.AuthProvider.EncryptionTypeNone}}>
|
||||
{{constants.AuthProvider.EncryptionTypeNone}}
|
||||
|
@ -105,86 +104,86 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-baseDN">Base DN</label>
|
||||
<label for="ldap-baseDN">{{localize 'auth_ldap_base'}}</label>
|
||||
{{input id="ldap-baseDN" type="text" value=ldapConfig.baseDN class="form-control"}}
|
||||
<small class="form-text text-muted">Starting point for search filters, e.g. ou=users,dc=example,dc=com</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_base_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-bindDN">Bind DN</label>
|
||||
<label for="ldap-bindDN">{{localize 'auth_ldap_bind'}}</label>
|
||||
{{input id="ldap-bindDN" type="text" value=ldapConfig.bindDN class=(if ldapErrorBindDN "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">login credentials for LDAP server</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_bind_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-bindPassword">Bind Password</label>
|
||||
<label for="ldap-bindPassword">{{localize 'auth_ldap_password'}}</label>
|
||||
{{input id="ldap-bindPassword" type="password" value=ldapConfig.bindPassword class=(if ldapErrorBindPassword "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">login credentials for LDAP server</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_bind_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-userFilter">User Filter</label>
|
||||
<label for="ldap-userFilter">{{localize 'auth_ldap_filter_user'}}</label>
|
||||
{{input id="ldap-userFilter" type="text" value=ldapConfig.userFilter class=(if ldapErrorNoFilter "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Search filter for finding users, e.g. (|(objectClass=person)(objectClass=user)(objectClass=inetOrgPerson))</small>
|
||||
<small class="form-text text-muted highlight">Specify User Filter and/or Group Filter</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_filter_user_explain1'}}</small>
|
||||
<small class="form-text text-muted highlight">{{localize 'auth_ldap_filter_user_explain2'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-groupFilter">Group Filter</label>
|
||||
<label for="ldap-groupFilter">{{localize 'auth_ldap_filter_group'}}</label>
|
||||
{{input id="ldap-groupFilter" type="text" value=ldapConfig.groupFilter class=(if ldapErrorNoFilter "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Search filter for finding users via groups, e.g. (&(objectClass=group)(|(cn=ship_crew)(cn=admin_staff)))</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_filter_group_explain'}}</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="ldap-attributeUserRDN">User Attribute RDN</label>
|
||||
<label for="ldap-attributeUserRDN">{{localize 'auth_ldap_rdn'}}</label>
|
||||
{{input id="ldap-attributeUserRDN" type="text" value=ldapConfig.attributeUserRDN class=(if ldapErrorAttributeUserRDN "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Username/login attribute, e.g. uid in LDAP, sAMAccountName in Active Directory</small>
|
||||
<small class="form-text text-muted highlight">User Attributes used to retreive data when using User Filter</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_rdn_explain1'}}</small>
|
||||
<small class="form-text text-muted highlight">{{localize 'auth_ldap_rdn_explain2'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-attributeUserFirstname">User Attribute Firstname</label>
|
||||
<label for="ldap-attributeUserFirstname">{{localize 'auth_ldap_firstname'}}</label>
|
||||
{{input id="ldap-attributeUserFirstname" type="text" value=ldapConfig.attributeUserFirstname class=(if ldapErrorAttributeUserFirstname "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Firstname attribute, e.g. givenName</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_firstname_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-attributeUserLastname">User Attribute Lastname</label>
|
||||
<label for="ldap-attributeUserLastname">{{localize 'auth_ldap_lastname'}}</label>
|
||||
{{input id="ldap-attributeUserLastname" type="text" value=ldapConfig.attributeUserLastname class=(if ldapErrorAttributeUserLastname "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Lastname attribute, e.g. sn</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_lastname_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-attributeUserEmail">User Attribute Email</label>
|
||||
<label for="ldap-attributeUserEmail">{{localize 'auth_ldap_email'}}</label>
|
||||
{{input id="ldap-attributeUserEmail" type="text" value=ldapConfig.attributeUserEmail class=(if ldapErrorAttributeUserEmail "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Email attribute, e.g. mail</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_email_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-attributeGroupMember">Group Attribute Member</label>
|
||||
<label for="ldap-attributeGroupMember">{{localize 'auth_ldap_group'}}</label>
|
||||
{{input id="ldap-attributeGroupMember" type="text" value=ldapConfig.attributeGroupMember class=(if ldapErrorAttributeGroupMember "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">Attribute that identifies individual group member, e.g. member or uniqueMember</small>
|
||||
<small class="form-text text-muted highlight">Group Attributes used to retreive data when using Group Filter</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_ldap_group_explain1'}}</small>
|
||||
<small class="form-text text-muted highlight">{{localize 'auth_ldap_group_explain2'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-disableLogout">Disable Logout</label>
|
||||
<label for="ldap-disableLogout">{{localize 'auth_disable_logout'}}</label>
|
||||
{{x-toggle value=ldapConfig.disableLogout size="medium" theme="light" onToggle=(action (mut ldapConfig.disableLogout))}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-defaultPermissionAddSpace">Can Create Spaces</label>
|
||||
<label for="ldap-defaultPermissionAddSpace">{{localize 'auth_role_space'}}</label>
|
||||
{{x-toggle value=ldapConfig.defaultPermissionAddSpace size="medium" theme="light" onToggle=(action (mut ldapConfig.defaultPermissionAddSpace))}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ldap-allowFormsAuth">Dual Login</label>
|
||||
<label for="ldap-allowFormsAuth">{{localize 'auth_dual_login'}}</label>
|
||||
{{x-toggle value=ldapConfig.allowFormsAuth size="medium" theme="light" onToggle=(action (mut ldapConfig.allowFormsAuth))}}
|
||||
<small class="form-text text-muted">Enable login via LDAP and regular Documize email/password (useful for testing LDAP)</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_dual_login_explain'}}</small>
|
||||
</div>
|
||||
{{ui/ui-button color=constants.Color.Yellow light=true label="Test →" onClick=(action "onLDAPPreview")}}
|
||||
{{ui/ui-button color=constants.Color.Yellow light=true label=(localize 'test') onClick=(action "onLDAPPreview")}}
|
||||
{{ui/ui-button-gap}}
|
||||
{{/if}}
|
||||
|
||||
{{#if isCASProvider}}
|
||||
<div class="form-group">
|
||||
<label for="cas-url">CAS Server URL</label>
|
||||
<label for="cas-url">{{localize 'auth_cas_url'}}</label>
|
||||
{{focus-input id="cas-url" type="text" value=casConfig.url class=(if casErrorUrl "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">e.g. http://localhost:8888/auth</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_cas_url_explain'}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cas-redirect-url">Documize CAS URL</label>
|
||||
<label for="cas-redirect-url">{{localize 'auth_cas_back_url'}}</label>
|
||||
{{focus-input id="cas-redirect-url" type="text" value=casConfig.redirectUrl class=(if casErrorRedirectUrl "form-control is-invalid" "form-control")}}
|
||||
<small class="form-text text-muted">e.g. http://DocumizeURL/auth/cas</small>
|
||||
<small class="form-text text-muted">{{localize 'auth_cas_back_url_explain'}}</small>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
|
@ -192,19 +191,19 @@
|
|||
</form>
|
||||
|
||||
{{#if (gt keycloakFailure.length 0)}}
|
||||
<p class="admin-setting-failure my-3">Keycloak connection failed: {{keycloakFailure}}</p>
|
||||
<p class="admin-setting-failure my-3">{{localize 'error'}} :: {{keycloakFailure}}</p>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div id="ldap-preview-modal" class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">LDAP Preview</div>
|
||||
<div class="modal-header">{{localize 'auth_ldap_preview'}}</div>
|
||||
<div class="modal-body">
|
||||
{{#if ldapPreview.isError}}
|
||||
<p class="text-danger">{{ldapPreview.message}}</p>
|
||||
{{else}}
|
||||
<p class="text-success">Connection successful, found {{ldapPreview.count}} users.</p>
|
||||
<p class="text-success">{{localize 'auth_ldap_preview_result' ldapPreview.count}}</p>
|
||||
{{#each ldapPreview.users as |user|}}
|
||||
<p>{{user.firstname}} {{user.lastname}} ({{user.email}})</p>
|
||||
{{/each}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue