diff --git a/apps/user_ldap/lib/AppInfo/Application.php b/apps/user_ldap/lib/AppInfo/Application.php index 70b7920f7ab17..25ca6f3a7baea 100644 --- a/apps/user_ldap/lib/AppInfo/Application.php +++ b/apps/user_ldap/lib/AppInfo/Application.php @@ -45,8 +45,10 @@ use Psr\Log\LoggerInterface; class Application extends App implements IBootstrap { + public const APP_ID = 'user_ldap'; + public function __construct() { - parent::__construct('user_ldap'); + parent::__construct(self::APP_ID); $container = $this->getContainer(); /** diff --git a/apps/user_ldap/lib/Settings/Admin.php b/apps/user_ldap/lib/Settings/Admin.php index a3144fd9c57fe..e1410441292ed 100644 --- a/apps/user_ldap/lib/Settings/Admin.php +++ b/apps/user_ldap/lib/Settings/Admin.php @@ -6,6 +6,7 @@ */ namespace OCA\User_LDAP\Settings; +use OCA\User_LDAP\AppInfo\Application; use OCA\User_LDAP\Configuration; use OCA\User_LDAP\Helper; use OCP\AppFramework\Http\TemplateResponse; @@ -59,7 +60,9 @@ public function getForm(): TemplateResponse { $this->initialState->provideInitialState('ldapConfigs', $ldapConfigs); $this->initialState->provideInitialState('ldapModuleInstalled', function_exists('ldap_connect')); - return new TemplateResponse('user_ldap', 'settings', $parameters); + \OCP\Util::addStyle(Application::APP_ID, 'settings-admin'); + \OCP\Util::addScript(Application::APP_ID, 'settings-admin'); + return new TemplateResponse(Application::APP_ID, 'settings', $parameters); } public function getSection(): string { diff --git a/apps/user_ldap/src/components/SettingsTabs/AdvancedTab.vue b/apps/user_ldap/src/components/SettingsTabs/AdvancedTab.vue index 5adb0181dbb0d..9bbe2ee7aa395 100644 --- a/apps/user_ldap/src/components/SettingsTabs/AdvancedTab.vue +++ b/apps/user_ldap/src/components/SettingsTabs/AdvancedTab.vue @@ -9,29 +9,29 @@ + @change="(event) => ldapConfigProxy.ldapBackupHost = event.target.value" /> + :label="t('user_ldap', 'Backup (Replica) Port')" + @change="(event) => ldapConfigProxy.ldapBackupPort = event.target.value" /> + @update:model-value="ldapConfigProxy.ldapOverrideMainServer = $event ? '1' : '0'"> {{ t('user_ldap', 'Disable Main Server') }} + @update:model-value="ldapConfigProxy.turnOffCertCheck = $event ? '1' : '0'"> {{ t('user_ldap', 'Turn off SSL certificate validation.') }} @@ -40,7 +40,7 @@ :label="t('user_ldap', 'Cache Time-To-Live')" :value="ldapConfigProxy.ldapCacheTTL" :helper-text="t('user_ldap', 'in seconds. A change empties the cache.')" - @change.native="(event) => ldapConfigProxy.ldapCacheTTL = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapCacheTTL = event.target.value" />
@@ -51,31 +51,31 @@ :value="ldapConfigProxy.ldapUserDisplayName" :label="t('user_ldap', 'User Display Name Field')" :helper-text="t('user_ldap', 'The LDAP attribute to use to generate the user\'s display name.')" - @change.native="(event) => ldapConfigProxy.ldapUserDisplayName = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapUserDisplayName = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapUserDisplayName2 = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapBaseUsers = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributesForUserSearch = event.target.value" /> + @update:model-value="ldapConfigProxy.markRemnantsAsDisabled = $event ? '1' : '0'"> {{ t('user_ldap', 'Disable users missing from LDAP') }} @@ -84,19 +84,19 @@ :value="ldapConfigProxy.ldapGroupDisplayName" :label="t('user_ldap', 'Group Display Name Field')" :title="t('user_ldap', 'The LDAP attribute to use to generate the groups\'s display name.')" - @change.native="(event) => ldapConfigProxy.ldapGroupDisplayName = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapGroupDisplayName = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapBaseGroups = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributesForGroupSearch = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapDynamicGroupMemberURL = event.target.value" /> + @update:model-value="ldapConfigProxy.ldapNestedGroups = $event ? '1' : '0'"> {{ t('user_ldap', 'Nested Groups') }} @@ -129,12 +129,12 @@ :label="t('user_ldap', 'Paging chunksize')" :value="ldapConfigProxy.ldapPagingSize" :helper-text="t('user_ldap', 'Chunksize used for paged LDAP searches that may return bulky results like user or group enumeration. (Setting it 0 disables paged LDAP searches in those situations.)')" - @change.native="(event) => ldapConfigProxy.ldapPagingSize = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapPagingSize = event.target.value" /> + @update:model-value="ldapConfigProxy.turnOnPasswordChange = $event ? '1' : '0'"> {{ t('user_ldap', 'Enable LDAP password changes per user') }} @@ -146,7 +146,7 @@ :label="t('user_ldap', 'Default password policy DN')" :value="ldapConfigProxy.ldapDefaultPPolicyDN" :helper-text="t('user_ldap', 'The DN of a default password policy that will be used for password expiry handling. Works only when LDAP password changes per user are enabled and is only supported by OpenLDAP. Leave empty to disable password expiry handling.')" - @change.native="(event) => ldapConfigProxy.ldapDefaultPPolicyDN = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapDefaultPPolicyDN = event.target.value" />
@@ -157,35 +157,35 @@ :value="ldapConfigProxy.ldapQuotaAttribute" :label="t('user_ldap', 'Quota Field')" :helper-text="t('user_ldap', 'Leave empty for user\'s default quota. Otherwise, specify an LDAP/AD attribute.')" - @change.native="(event) => ldapConfigProxy.ldapQuotaAttribute = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapQuotaAttribute = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapQuotaDefault = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapEmailAttribute = event.target.value" /> + @change="(event) => ldapConfigProxy.homeFolderNamingRule = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapExtStorageHomeAttribute = event.target.value" />
@@ -196,70 +196,70 @@ :label="t('user_ldap', 'Phone Field')" :value="ldapConfigProxy.ldapAttributePhone" :helper-text="t('user_ldap', 'User profile Phone will be set from the specified attribute')" - @change.native="(event) => ldapConfigProxy.ldapAttributePhone = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributePhone = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeWebsite = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeAddress = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeTwitter = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeFediverse = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeOrganisation = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeRole = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeHeadline = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeBiography = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapAttributeBirthDate = event.target.value" />
diff --git a/apps/user_ldap/src/components/SettingsTabs/ExpertTab.vue b/apps/user_ldap/src/components/SettingsTabs/ExpertTab.vue index 35962ae5c2874..79559115a30b5 100644 --- a/apps/user_ldap/src/components/SettingsTabs/ExpertTab.vue +++ b/apps/user_ldap/src/components/SettingsTabs/ExpertTab.vue @@ -14,8 +14,7 @@ autocomplete="off" :label="t('user_ldap', 'Internal Username Attribute:')" :value="ldapConfigProxy.ldapExpertUsernameAttr" - :label-outside="true" - @change.native="(event) => ldapConfigProxy.ldapExpertUsernameAttr = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapExpertUsernameAttr = event.target.value" />
@@ -28,12 +27,12 @@ autocomplete="off" :label="t('user_ldap', 'UUID Attribute for Users')" :value="ldapConfigProxy.ldapExpertUUIDUserAttr" - @change.native="(event) => ldapConfigProxy.ldapExpertUUIDUserAttr = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapExpertUUIDUserAttr = event.target.value" /> + @change="(event) => ldapConfigProxy.ldapExpertUUIDGroupAttr = event.target.value" />
diff --git a/apps/user_ldap/src/components/SettingsTabs/GroupsTab.vue b/apps/user_ldap/src/components/SettingsTabs/GroupsTab.vue index 00a045b7fc2a8..3e09b5d1cd83f 100644 --- a/apps/user_ldap/src/components/SettingsTabs/GroupsTab.vue +++ b/apps/user_ldap/src/components/SettingsTabs/GroupsTab.vue @@ -28,14 +28,14 @@
+ :model-value="ldapConfigProxy.ldapGroupFilterMode === '1'" + @update:model-value="toggleFilterMode"> {{ t('user_ldap', 'Edit LDAP Query') }}
@@ -96,10 +96,10 @@ const ldapGroupFilterGroups = computed({ */ async function init() { const response1 = await callWizard('determineGroupObjectClasses', props.configId) - groupObjectClasses.value = response1.options!.ldap_groupfilter_objectclass + groupObjectClasses.value = response1.options?.ldap_groupfilter_objectclass ?? [] const response2 = await callWizard('determineGroupsForGroups', props.configId) - groupGroups.value = response2.options!.ldap_groupfilter_groups + groupGroups.value = response2.options?.ldap_groupfilter_groups ?? [] } init() @@ -110,7 +110,7 @@ init() async function getGroupFilter() { const response = await callWizard('getGroupFilter', props.configId) // Not using ldapConfig to avoid triggering the save logic. - ldapConfigs.value[props.configId].ldapGroupFilter = response.changes!.ldap_group_filter as string + ldapConfigs.value[props.configId]!.ldapGroupFilter = (response.changes?.ldap_group_filter as string | undefined) ?? '' } /** diff --git a/apps/user_ldap/src/components/SettingsTabs/LoginTab.vue b/apps/user_ldap/src/components/SettingsTabs/LoginTab.vue index d734c726cb34c..d8742ed40ae85 100644 --- a/apps/user_ldap/src/components/SettingsTabs/LoginTab.vue +++ b/apps/user_ldap/src/components/SettingsTabs/LoginTab.vue @@ -21,16 +21,16 @@