chore(user_ldap): Delete legacy templates

Not needed anymore after the vue migration

Signed-off-by: Louis Chmn <louis@chmn.me>
pull/56570/head
Louis Chmn 2025-11-21 15:24:14 +07:00 committed by Ferdinand Thiessen
parent c4da3cca34
commit 4f9efc4c81
7 changed files with 0 additions and 443 deletions

@ -1,19 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2013-2017 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
?>
<div class="ldapSettingControls">
<button type="button" class="ldap_action_test_connection" name="ldap_action_test_connection">
<?php p($l->t('Test Configuration'));?>
</button>
<a href="<?php p(link_to_docs('admin-ldap')); ?>"
target="_blank" rel="noreferrer noopener">
<img src="<?php print_unescaped(image_path('core', 'actions/info.svg')); ?>"
style="height:1.75ex" />
<?php p($l->t('Help'));?>
</a>
</div>

@ -1,83 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2013-2015 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
?>
<fieldset id="ldapWizard4">
<div>
<p>
<?php p($l->t('Groups meeting these criteria are available in %s:', [$theme->getName()]));?>
</p>
<p>
<label for="ldap_groupfilter_objectclass">
<?php p($l->t('Only these object classes:'));?>
</label>
<select id="ldap_groupfilter_objectclass" multiple="multiple"
name="ldap_groupfilter_objectclass" class="multiSelectPlugin">
</select>
</p>
<p>
<label for="ldap_groupfilter_groups">
<?php p($l->t('Only from these groups:'));?>
</label>
<input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="<?php p($l->t('Search groups'));?>" />
<select id="ldap_groupfilter_groups" multiple="multiple"
name="ldap_groupfilter_groups" class="multiSelectPlugin">
</select>
</p>
<p class="ldapManyGroupsSupport hidden">
<label></label>
<select class="ldapGroupList ldapGroupListAvailable" multiple="multiple"
aria-describedby="ldapGroupListAvailable_instructions"
title="<?php p($l->t('Available groups'));?>"></select>
<p class="hidden-visually" id="ldapGroupListAvailable_instructions">
<?php p($l->t('Available groups'));?>
</p>
<span class="buttonSpan">
<button class="ldapGroupListSelect" type="button">&gt;</button><br/>
<button class="ldapGroupListDeselect" type="button">&lt;</button>
</span>
<select class="ldapGroupList ldapGroupListSelected" multiple="multiple"
aria-describedby="ldapGroupListSelected_instructions"
title="<?php p($l->t('Selected groups'));?>"></select>
<p class="hidden-visually" id="ldapGroupListSelected_instructions">
<?php p($l->t('Selected groups'));?>
</p>
</p>
<p>
<label><a id='toggleRawGroupFilter' class='ldapToggle'><?php p($l->t('Edit LDAP Query'));?></a></label>
</p>
<p id="ldapReadOnlyGroupFilterContainer" class="hidden ldapReadOnlyFilterContainer">
<label><?php p($l->t('LDAP Filter:'));?></label>
<span class="ldapFilterReadOnlyElement ldapInputColElement"></span>
</p>
<p id="rawGroupFilterContainer" class="invisible">
<textarea type="text" id="ldap_group_filter" name="ldap_group_filter"
placeholder="<?php p($l->t('Edit LDAP Query'));?>"
aria-describedby="rawGroupFilterContainer_instructions"
title="<?php p($l->t('The filter specifies which LDAP groups shall have access to the %s instance.', [$theme->getName()]));?>">
</textarea>
<p class="hidden-visually" id="rawGroupFilterContainer_instructions">
<?php p($l->t('The filter specifies which LDAP groups shall have access to the %s instance.', [$theme->getName()]));?>
</p>
</p>
<p>
<div class="ldapWizardInfo invisible">&nbsp;</div>
</p>
<p class="ldap_count">
<button class="ldapGetEntryCount ldapGetGroupCount" name="ldapGetEntryCount" type="button">
<?php p($l->t('Verify settings and count the groups'));?>
</button>
<span id="ldap_group_count"></span>
</p>
<?php print_unescaped($_['wizardControls']); ?>
</div>
</fieldset>

@ -1,85 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2013-2017 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
?>
<fieldset id="ldapWizard3">
<div>
<p>
<?php p($l->t('When logging in, %s will find the user based on the following attributes:', [$theme->getName()]));?>
</p>
<p>
<label for="ldap_loginfilter_username">
<?php p($l->t('LDAP/AD Username:'));?>
</label>
<input type="checkbox" id="ldap_loginfilter_username"
aria-describedby="ldap_loginfilter_username_instructions"
title="<?php p($l->t('Allows login against the LDAP/AD username, which is either "uid" or "sAMAccountName" and will be detected.'));?>"
name="ldap_loginfilter_username" value="1" />
<p class="hidden-visually" id="ldap_loginfilter_username_instructions">
<?php p($l->t('Allows login against the LDAP/AD username, which is either "uid" or "sAMAccountName" and will be detected.'));?>
</p>
</p>
<p>
<label for="ldap_loginfilter_email">
<?php p($l->t('LDAP/AD Email Address:'));?>
</label>
<input type="checkbox" id="ldap_loginfilter_email"
title="<?php p($l->t('Allows login against an email attribute. "mail" and "mailPrimaryAddress" allowed.'));?>"
aria-describedby="ldap_loginfilter_email_instructions"
name="ldap_loginfilter_email" value="1" />
<p class="hidden-visually" id="ldap_loginfilter_email_instructions">
<?php p($l->t('Allows login against an email attribute. "mail" and "mailPrimaryAddress" allowed.'));?>
</p>
</p>
<p>
<label for="ldap_loginfilter_attributes">
<?php p($l->t('Other Attributes:'));?>
</label>
<select id="ldap_loginfilter_attributes" multiple="multiple"
name="ldap_loginfilter_attributes" class="multiSelectPlugin">
</select>
</p>
<p>
<label><a id='toggleRawLoginFilter' class='ldapToggle'><?php p($l->t('Edit LDAP Query'));?></a></label>
</p>
<p id="ldapReadOnlyLoginFilterContainer" class="hidden ldapReadOnlyFilterContainer">
<label><?php p($l->t('LDAP Filter:'));?></label>
<span class="ldapFilterReadOnlyElement ldapInputColElement"></span>
</p>
<p id="rawLoginFilterContainer" class="invisible">
<textarea type="text" id="ldap_login_filter" name="ldap_login_filter"
class="ldapFilterInputElement"
placeholder="<?php p($l->t('Edit LDAP Query'));?>"
aria-describedby="ldap_login_filter_instructions"
title="<?php p($l->t('Defines the filter to apply, when login is attempted. "%%uid" replaces the username in the login action. Example: "uid=%%uid"'));?>">
</textarea>
<p class="hidden-visually" id="ldap_login_filter_instructions">
<?php p($l->t('Defines the filter to apply, when login is attempted. "%%uid" replaces the username in the login action. Example: "uid=%%uid"'));?>
</p>
</p>
<p>
<div class="ldapWizardInfo invisible">&nbsp;</div>
</p>
<p class="ldap_verify">
<input type="text" id="ldap_test_loginname" name="ldap_test_loginname"
placeholder="<?php p($l->t('Test Loginname'));?>"
class="ldapVerifyInput"
aria-describedby="ldap_test_loginname_instructions"
title="<?php p($l->t('Attempts to receive a DN for the given loginname and the current login filter'));?>"/>
<p class="hidden-visually" id="ldap_test_loginname_instructions">
<?php p($l->t('Attempts to receive a DN for the given loginname and the current login filter'));?>
</p>
<button class="ldapVerifyLoginName" name="ldapTestLoginSettings" type="button" disabled="disabled">
<?php p($l->t('Verify settings'));?>
</button>
</p>
<?php print_unescaped($_['wizardControls']); ?>
</div>
</fieldset>

@ -1,137 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2013-2017 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
?>
<fieldset id="ldapWizard1">
<p>
<select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser">
<?php
$i = 1;
$sel = ' selected';
foreach ($_['serverConfigurationPrefixes'] as $prefix) {
?>
<option value="<?php p($prefix); ?>"<?php p($sel);
$sel = ''; ?>><?php p($l->t('%s. Server:', [$i++])); ?> <?php p(' ' . $_['serverConfigurationHosts'][$prefix]); ?></option>
<?php
}
?>
</select>
<button type="button" id="ldap_action_add_configuration"
aria-describedby="ldap_action_add_configuration_instructions"
name="ldap_action_add_configuration" class="icon-add icon-default-style"
title="<?php p($l->t('Add a new configuration'));?>">&nbsp;</button>
<p class="hidden-visually" id="ldap_action_add_configuration_instructions">
<?php p($l->t('Add a new configuration'));?>
</p>
<button type="button" id="ldap_action_copy_configuration"
name="ldap_action_copy_configuration"
aria-describedby="ldap_action_copy_configuration_instructions"
class="ldapIconCopy icon-default-style"
title="<?php p($l->t('Copy current configuration into new directory binding'));?>">&nbsp;</button>
<p class="hidden-visually" id="ldap_action_copy_configuration_instructions">
<?php p($l->t('Copy current configuration into new directory binding'));?>
</p>
<button type="button" id="ldap_action_delete_configuration"
aria-describedby="ldap_action_delete_configuration_instructions"
name="ldap_action_delete_configuration" class="icon-delete icon-default-style"
title="<?php p($l->t('Delete the current configuration'));?>">&nbsp;</button>
<p class="hidden-visually" id="ldap_action_delete_configuration_instructions">
<?php p($l->t('Delete the current configuration'));?>
</p>
</p>
<div class="hostPortCombinator">
<div class="tablerow">
<div class="tablecell">
<div class="table">
<input type="text" class="host" id="ldap_host"
name="ldap_host"
aria-describedby="ldap_host_instructions"
placeholder="<?php p($l->t('Host'));?>"
title="<?php p($l->t('You can omit the protocol, unless you require SSL. If so, start with ldaps://'));?>"
/>
<p class="hidden-visually" id="ldap_host_instructions">
<?php p($l->t('You can omit the protocol, unless you require SSL. If so, start with ldaps://'));?>
</p>
<span class="hostPortCombinatorSpan">
<input type="number" id="ldap_port" name="ldap_port"
placeholder="<?php p($l->t('Port'));?>" />
<button class="ldapDetectPort" name="ldapDetectPort" type="button">
<?php p($l->t('Detect Port'));?>
</button>
</span>
</div>
</div>
</div>
<div class="tablerow">&nbsp;</div>
<div class="tablerow">
<input type="text" id="ldap_dn" name="ldap_dn"
class="tablecell"
aria-describedby="ldap_dn_instructions"
placeholder="<?php p($l->t('User DN'));?>" autocomplete="off"
title="<?php p($l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.'));?>"
/>
<p class="hidden-visually" id="ldap_dn_instructions">
<?php p($l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.'));?>
</p>
</div>
<div class="tablerow">
<input type="password" id="ldap_agent_password"
class="tablecell" name="ldap_agent_password"
aria-describedby="ldap_agent_password_instructions"
placeholder="<?php p($l->t('Password'));?>" autocomplete="off"
title="<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>"
/>
<p class="hidden-visually" id="ldap_agent_password_instructions">
<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>
</p>
<button class="ldapSaveAgentCredentials" name="ldapSaveAgentCredentials" type="button">
<?php p($l->t('Save Credentials'));?>
</button>
</div>
<div class="tablerow">&nbsp;</div>
<div class="tablerow">
<textarea id="ldap_base" name="ldap_base"
class="tablecell"
aria-describedby="ldap_base_instructions"
placeholder="<?php p($l->t('One Base DN per line'));?>"
title="<?php p($l->t('You can specify Base DN for users and groups in the Advanced tab'));?>">
</textarea>
<p class="hidden-visually" id="ldap_base_instructions">
<?php p($l->t('You can specify Base DN for users and groups in the Advanced tab'));?>
</p>
<button class="ldapDetectBase" name="ldapDetectBase" type="button">
<?php p($l->t('Detect Base DN'));?>
</button>
<button class="ldapTestBase" name="ldapTestBase" type="button">
<?php p($l->t('Test Base DN'));?>
</button>
</div>
<div class="tablerow left">
<input type="checkbox" id="ldap_experienced_admin" value="1"
name="ldap_experienced_admin" class="tablecell"
aria-describedby="ldap_experienced_admin_instructions"
title="<?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.'));?>"
/>
<p class="hidden-visually" id="ldap_experienced_admin_instructions">
<?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.'));?>
</p>
<label for="ldap_experienced_admin" class="tablecell">
<?php p($l->t('Manually enter LDAP filters (recommended for large directories)'));?>
</label>
</div>
<div class="tablerow">
<div class="tablecell ldapWizardInfo invisible">&nbsp;
</div>
</div>
</div>
<?php print_unescaped($_['wizardControls']); ?>
</fieldset>

@ -1,86 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2013-2016 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
?>
<fieldset id="ldapWizard2">
<div>
<p>
<?php p($l->t('Listing and searching for users is constrained by these criteria:'));?>
</p>
<p>
<label for="ldap_userfilter_objectclass">
<?php p($l->t('Only these object classes:'));?>
</label>
<select id="ldap_userfilter_objectclass" multiple="multiple"
name="ldap_userfilter_objectclass" class="multiSelectPlugin">
</select>
</p>
<p>
<label></label>
<span class="ldapInputColElement"><?php p($l->t('The most common object classes for users are organizationalPerson, person, user, and inetOrgPerson. If you are not sure which object class to select, please consult your directory admin.'));?></span>
</p>
<p>
<label for="ldap_userfilter_groups">
<?php p($l->t('Only from these groups:'));?>
</label>
<input type="text" class="ldapManyGroupsSupport ldapManyGroupsSearch hidden" placeholder="<?php p($l->t('Search groups'));?>" />
<select id="ldap_userfilter_groups" multiple="multiple"
name="ldap_userfilter_groups" class="multiSelectPlugin">
</select>
</p>
<p class="ldapManyGroupsSupport hidden">
<label></label>
<select class="ldapGroupList ldapGroupListAvailable" multiple="multiple"
aria-describedby="ldapGroupListAvailable_instructions"
title="<?php p($l->t('Available groups'));?>"></select>
<p class="hidden-visually" id="ldapGroupListAvailable_instructions">
<?php p($l->t('Available groups'));?>
</p>
<span class="buttonSpan">
<button class="ldapGroupListSelect" type="button">&gt;</button><br/>
<button class="ldapGroupListDeselect" type="button">&lt;</button>
</span>
<select class="ldapGroupList ldapGroupListSelected" multiple="multiple"
aria-describedby="ldapGroupListSelected_instructions"
title="<?php p($l->t('Selected groups'));?>"></select>
<p class="hidden-visually" id="ldapGroupListSelected_instructions">
<?php p($l->t('Selected groups'));?>
</p>
</p>
<p>
<label><a id='toggleRawUserFilter' class='ldapToggle'><?php p($l->t('Edit LDAP Query'));?></a></label>
</p>
<p id="ldapReadOnlyUserFilterContainer" class="hidden ldapReadOnlyFilterContainer">
<label><?php p($l->t('LDAP Filter:'));?></label>
<span class="ldapFilterReadOnlyElement ldapInputColElement"></span>
</p>
<p id="rawUserFilterContainer">
<textarea type="text" id="ldap_userlist_filter" name="ldap_userlist_filter"
class="ldapFilterInputElement"
placeholder="<?php p($l->t('Edit LDAP Query'));?>"
aria-describedby="ldap_userlist_filter_instructions"
title="<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', [$theme->getName()]));?>">
</textarea>
<p class="hidden-visually" id="ldap_userlist_filter_instructions">
<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', [$theme->getName()]));?>
</p>
</p>
<p>
<div class="ldapWizardInfo invisible">&nbsp;</div>
</p>
<p class="ldap_count">
<button class="ldapGetEntryCount ldapGetUserCount" name="ldapGetEntryCount" type="button">
<?php p($l->t('Verify settings and count users'));?>
</button>
<span id="ldap_user_count"></span>
</p>
<?php print_unescaped($_['wizardControls']); ?>
</div>
</fieldset>

@ -1,25 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2017-2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2013-2017 ownCloud, Inc.
* SPDX-License-Identifier: AGPL-3.0-only
*/
?>
<div class="ldapWizardControls">
<span class="ldap_saving hidden"><?php p($l->t('Saving'));?> <img class="wizSpinner" src="<?php p(image_path('core', 'loading.gif')); ?>"/></span>
<span class="ldap_config_state_indicator"></span> <span class="ldap_config_state_indicator_sign"></span>
<button class="ldap_action_back invisible" name="ldap_action_back"
type="button">
<?php p($l->t('Back'));?>
</button>
<button class="ldap_action_continue primary" name="ldap_action_continue" type="button">
<?php p($l->t('Continue'));?>
</button>
<a href="<?php p(link_to_docs('admin-ldap')); ?>"
target="_blank" rel="noreferrer noopener">
<img src="<?php print_unescaped(image_path('core', 'actions/info.svg')); ?>"
style="height:1.75ex" />
<span class="ldap_grey"><?php p($l->t('Help'));?></span>
</a>
</div>

@ -41,14 +41,6 @@ class AdminTest extends TestCase {
} }
public function testGetForm(): void { public function testGetForm(): void {
$prefixes = ['s01'];
$hosts = ['s01' => ''];
$wControls = $this->templateManager->getTemplate('user_ldap', 'part.wizardcontrols');
$wControls = $wControls->fetchPage();
$sControls = $this->templateManager->getTemplate('user_ldap', 'part.settingcontrols');
$sControls = $sControls->fetchPage();
$parameters = []; $parameters = [];
// assign default values // assign default values