diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-03-03 11:56:03 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-04-09 09:47:49 +0200 |
commit | 5355c285fc5dfce3daf945fa6d5080f6c381d1ee (patch) | |
tree | 251ac25d57eeb82d3a9aaf0b6f79badcf00875bb /apps/user_ldap/templates | |
parent | 56f1ffe820383ac82c208552213848c6a8deec6d (diff) | |
download | nextcloud-server-5355c285fc5dfce3daf945fa6d5080f6c381d1ee.tar.gz nextcloud-server-5355c285fc5dfce3daf945fa6d5080f6c381d1ee.zip |
LDAP Wizard Overhaul
wizard refactor
reimplement save spinners and cursor
implement Port detector
introduced detector queue, added base dn detector
disable input fields when detectors are running
introduce spinners for fields that are being updated by detector
cache jq element objects
consolidate processing of detector results in generic / abstract base class
display notification if a detector discovered a problem
don't run base dn detector if a base is configured
reset detector queue on configuration switch
implement functionality check and update of status indicator
document ConfigModel
jsdoc for controller and main view
more documentation
implement the user filter tab view
so far the multiselects get initialized (not filled yet) and the mode can be switched.
mode is also restored.
reintroduce filter switch confirmation in admin XP mode
new detector for user object classes. so we also load user object classes if necessary and are able to save and show the setting.
multiselect trigger save actions now on close only
show spinners automatically, when a detector is running
20k limit for object classes preselection test
adjust wordings, fix grammar
add group (for users tab) detector
also includes wording fixes
error presentation moved from detectors to view, where it belongs
add info label to users page
missing wording changes
show effective LDAP filter in Assisted Mode
add user filter detector
implement count button for users and limit all count actions to 1001 for performance reasons
make port field a bit bigger. not perfect though.
do not detect port automatically
implement login filter tab view
only load features in assisted mode and don't enable assisted fields while in raw mode
add tooltips on login filter checkbox options for better understanding
permanently show filter on login tab
and also compile login filter in assisted mode
test/verify button on login attributes tab, with backend changes.
only run wizard requests if your an active tab. also run compile filter requests when switching to assisted mode
underline toggle filter links to stress that they are clickable
unity user and group tab functionality in common abstract class, add group filter tab view. only detectors and template adjustments left to have group tab implementation complete
add object class and group detector for groups as well as filter composer
show ldap filter permanently on groups tab
introduce input element that can deal better with many groups, will be used with > 40
fix disabling complex group chooser while detection is running
hide complex group chooser on config switch
fix few more issues with complex chooser
make complex group chooser available on Users tab as well
detect base dn improvements/changes:
- do not look for Base DN automatically, offer a button instead
- fix for alternative way to detect a base dn (if agent dn is not given)
- do not trigger filter composers on config switch
Changes with configuration chooser controls
- "New" was removed out of the configuration list
- and split into buttons "add" and "copy"
- delete button is also now an icon
add test button for Base DN
reimplement advanced tab. The save button is gone.
reimplement expert tab
remove unused methods
implement mail attribute detector
implement user display name attribute detection
implement member group association detector
replace text input with textarea for raw filter input
finish functionality check
auto-enable good configurations, as it was before
cleanup
move save confirmation handling to base class, reduces code duplication
enable tabs only if no running save processes are left.
move onConfigLoaded to base class, avoids code duplication
simplify, save LOCs
Test Configuration button to be dealt with in main view as it is a cross-tab element
require detectorQueue in constructor
cleanup
put bootstrap into a function and thus make it testable
get rid of old stuff
Diffstat (limited to 'apps/user_ldap/templates')
-rw-r--r-- | apps/user_ldap/templates/part.settingcontrols.php | 1 | ||||
-rw-r--r-- | apps/user_ldap/templates/part.wizard-groupfilter.php | 42 | ||||
-rw-r--r-- | apps/user_ldap/templates/part.wizard-loginfilter.php | 40 | ||||
-rw-r--r-- | apps/user_ldap/templates/part.wizard-server.php | 31 | ||||
-rw-r--r-- | apps/user_ldap/templates/part.wizard-userfilter.php | 53 | ||||
-rw-r--r-- | apps/user_ldap/templates/settings.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/templates/wizard-container.php | 3 |
7 files changed, 123 insertions, 50 deletions
diff --git a/apps/user_ldap/templates/part.settingcontrols.php b/apps/user_ldap/templates/part.settingcontrols.php index e67cea41d9c..bac00daa39f 100644 --- a/apps/user_ldap/templates/part.settingcontrols.php +++ b/apps/user_ldap/templates/part.settingcontrols.php @@ -1,5 +1,4 @@ <div class="ldapSettingControls"> - <input class="ldap_submit" value="<?php p($l->t('Save'));?>" type="submit"> <button type="button" class="ldap_action_test_connection" name="ldap_action_test_connection"> <?php p($l->t('Test Configuration'));?> </button> diff --git a/apps/user_ldap/templates/part.wizard-groupfilter.php b/apps/user_ldap/templates/part.wizard-groupfilter.php index 1953d2eaa6e..bfcfd115218 100644 --- a/apps/user_ldap/templates/part.wizard-groupfilter.php +++ b/apps/user_ldap/templates/part.wizard-groupfilter.php @@ -5,31 +5,48 @@ </p> <p> <label for="ldap_groupfilter_objectclass"> - <?php p($l->t('only those object classes:'));?> + <?php p($l->t('Only these object classes:'));?> </label> <select id="ldap_groupfilter_objectclass" multiple="multiple" - name="ldap_groupfilter_objectclass"> + name="ldap_groupfilter_objectclass" class="multiSelectPlugin"> </select> </p> <p> <label for="ldap_groupfilter_groups"> - <?php p($l->t('only from those 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"> + name="ldap_groupfilter_groups" class="multiSelectPlugin"> </select> + + </p> + <p class="ldapManyGroupsSupport hidden"> + <label></label> + <select class="ldapGroupList ldapGroupListAvailable" multiple="multiple" + title="<?php p($l->t('Available groups'));?>"></select> + <span> + <button class="ldapGroupListSelect" type="button">></button><br/> + <button class="ldapGroupListDeselect" type="button"><</button> + </span> + <select class="ldapGroupList ldapGroupListSelected" multiple="multiple" + title="<?php p($l->t('Selected groups'));?>"></select> </p> <p> - <label><a id='toggleRawGroupFilter'>↓ <?php p($l->t('Edit raw filter instead'));?></a></label> + <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"> - <input type="text" id="ldap_group_filter" name="ldap_group_filter" - class="lwautosave" - placeholder="<?php p($l->t('Raw LDAP filter'));?>" - title="<?php p($l->t('The filter specifies which LDAP groups shall have access to the %s instance.', $theme->getName()));?>" - /> + <textarea type="text" id="ldap_group_filter" name="ldap_group_filter" + placeholder="<?php p($l->t('Edit LDAP Query'));?>" + title="<?php p($l->t('The filter specifies which LDAP groups shall have access to the %s instance.', $theme->getName()));?>"> + </textarea> <button class="ldapGetEntryCount hidden" name="ldapGetEntryCount" type="button"> <?php p($l->t('Test Filter'));?> </button> @@ -38,7 +55,10 @@ <div class="ldapWizardInfo invisible"> </div> </p> <p class="ldap_count"> - <span id="ldap_group_count">0 <?php p($l->t('groups found'));?></span> + <button class="ldapGetEntryCount ldapGetGroupCount" name="ldapGetEntryCount" type="button"> + <?php p($l->t('Verify settings and count groups'));?> + </button> + <span id="ldap_group_count"></span> </p> <?php print_unescaped($_['wizardControls']); ?> </div> diff --git a/apps/user_ldap/templates/part.wizard-loginfilter.php b/apps/user_ldap/templates/part.wizard-loginfilter.php index 3dde46fa979..fa17a9b430b 100644 --- a/apps/user_ldap/templates/part.wizard-loginfilter.php +++ b/apps/user_ldap/templates/part.wizard-loginfilter.php @@ -1,23 +1,25 @@ <fieldset id="ldapWizard3"> <div> <p> - <?php p($l->t('Users login with this attribute:'));?> + <?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 Username:'));?> + <?php p($l->t('LDAP / AD Username:'));?> </label> <input type="checkbox" id="ldap_loginfilter_username" - name="ldap_loginfilter_username" value="1" class="lwautosave" /> + 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> <p> <label for="ldap_loginfilter_email"> - <?php p($l->t('LDAP Email Address:'));?> + <?php p($l->t('LDAP / AD Email Address:'));?> </label> <input type="checkbox" id="ldap_loginfilter_email" - name="ldap_loginfilter_email" value="1" class="lwautosave" /> + title="<?php p($l->t('Allows login against an email attribute. Mail and mailPrimaryAddress will be allowed.'));?>" + name="ldap_loginfilter_email" value="1" /> </p> <p> <label for="ldap_loginfilter_attributes"> @@ -25,23 +27,35 @@ </label> <select id="ldap_loginfilter_attributes" multiple="multiple" - name="ldap_loginfilter_attributes"> + name="ldap_loginfilter_attributes" class="multiSelectPlugin"> </select> </p> <p> - <label><a id='toggleRawLoginFilter'>↓ <?php p($l->t('Edit raw filter instead'));?></a></label> + <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"> - <input type="text" id="ldap_login_filter" name="ldap_login_filter" - class="lwautosave" - placeholder="<?php p($l->t('Raw LDAP filter'));?>" - 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 type="text" id="ldap_login_filter" name="ldap_login_filter" + class="ldapFilterInputElement" + placeholder="<?php p($l->t('Edit LDAP Query'));?>" + 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> <p> <div class="ldapWizardInfo invisible"> </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" + title="Attempts to receive a DN for the given loginname and the current login filter"/> + <button class="ldapVerifyLoginName" name="ldapTestLoginSettings" type="button"> + <?php p($l->t('Verify settings'));?> + </button> + </p> <?php print_unescaped($_['wizardControls']); ?> </div> </fieldset>
\ No newline at end of file diff --git a/apps/user_ldap/templates/part.wizard-server.php b/apps/user_ldap/templates/part.wizard-server.php index c1744143f98..3ce912fac4a 100644 --- a/apps/user_ldap/templates/part.wizard-server.php +++ b/apps/user_ldap/templates/part.wizard-server.php @@ -22,32 +22,41 @@ } } ?> - <option value="NEW"><?php p($l->t('Add Server Configuration'));?></option> </select> + <button type="button" id="ldap_action_add_configuration" + name="ldap_action_add_configuration" class="icon-add" + title="Adds a new and blank configuration"> </button> + <button type="button" id="ldap_action_copy_configuration" + name="ldap_action_copy_configuration" + class="ldapIconCopy icon-default-style" + title="Copy current configuration into new directory binding"> </button> <button type="button" id="ldap_action_delete_configuration" - name="ldap_action_delete_configuration"><?php p($l->t('Delete Configuration'));?></button> + name="ldap_action_delete_configuration" class="icon-delete" + title="Delete the current configuration"> </button> </p> <div class="hostPortCombinator"> <div class="tablerow"> <div class="tablecell"> <div class="table"> - <input type="text" class="host tablecell lwautosave" id="ldap_host" + <input type="text" class="host" id="ldap_host" name="ldap_host" placeholder="<?php p($l->t('Host'));?>" title="<?php p($l->t('You can omit the protocol, except you require SSL. Then start with ldaps://'));?>" /> <span> <input type="number" id="ldap_port" name="ldap_port" - class="lwautosave" 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"> <input type="text" id="ldap_dn" name="ldap_dn" - class="tablecell lwautosave" + class="tablecell" 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.'));?>" /> @@ -55,7 +64,7 @@ <div class="tablerow"> <input type="password" id="ldap_agent_password" - class="tablecell lwautosave" name="ldap_agent_password" + class="tablecell" name="ldap_agent_password" placeholder="<?php p($l->t('Password'));?>" autocomplete="off" title="<?php p($l->t('For anonymous access, leave DN and Password empty.'));?>" /> @@ -63,15 +72,21 @@ <div class="tablerow"> <textarea id="ldap_base" name="ldap_base" - class="tablecell lwautosave" + class="tablecell" 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> + <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 lwautosave" + name="ldap_experienced_admin" class="tablecell" title="<?php p($l->t('Avoids automatic LDAP requests. Better for bigger setups, but requires some LDAP knowledge.'));?>" /> <label for="ldap_experienced_admin" class="tablecell"> diff --git a/apps/user_ldap/templates/part.wizard-userfilter.php b/apps/user_ldap/templates/part.wizard-userfilter.php index 99a6e75370b..691c41a66a6 100644 --- a/apps/user_ldap/templates/part.wizard-userfilter.php +++ b/apps/user_ldap/templates/part.wizard-userfilter.php @@ -5,40 +5,61 @@ </p> <p> <label for="ldap_userfilter_objectclass"> - <?php p($l->t('only those object classes:'));?> + <?php p($l->t('Only these object classes:'));?> </label> <select id="ldap_userfilter_objectclass" multiple="multiple" - name="ldap_userfilter_objectclass"> + 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 those 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"> + name="ldap_userfilter_groups" class="multiSelectPlugin"> </select> </p> + <p class="ldapManyGroupsSupport hidden"> + <label></label> + <select class="ldapGroupList ldapGroupListAvailable" multiple="multiple" + title="<?php p($l->t('Available groups'));?>"></select> + <span> + <button class="ldapGroupListSelect" type="button">></button><br/> + <button class="ldapGroupListDeselect" type="button"><</button> + </span> + <select class="ldapGroupList ldapGroupListSelected" multiple="multiple" + title="<?php p($l->t('Selected groups'));?>"></select> + </p> <p> - <label><a id='toggleRawUserFilter'>↓ <?php p($l->t('Edit raw filter instead'));?></a></label> - </p> - <p id="rawUserFilterContainer" class="invisible"> - <input type="text" id="ldap_userlist_filter" name="ldap_userlist_filter" - class="lwautosave" - placeholder="<?php p($l->t('Raw LDAP filter'));?>" - title="<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', $theme->getName()));?>" - /> - <button class="ldapGetEntryCount hidden" name="ldapGetEntryCount" type="button"> - <?php p($l->t('Test Filter'));?> - </button> + <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'));?>" + title="<?php p($l->t('The filter specifies which LDAP users shall have access to the %s instance.', $theme->getName()));?>"> + </textarea> </p> <p> <div class="ldapWizardInfo invisible"> </div> </p> <p class="ldap_count"> - <span id="ldap_user_count">0 <?php p($l->t('users found'));?></span> + <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> diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php index 6aa2183726b..833bef8c24d 100644 --- a/apps/user_ldap/templates/settings.php +++ b/apps/user_ldap/templates/settings.php @@ -65,5 +65,6 @@ <?php print_unescaped($_['settingControls']); ?> </fieldset> </div> - + <!-- Spinner Template --> + <img class="ldapSpinner hidden" src="<?php p(\OCP\Util::imagePath('core', 'loading.gif')); ?>"> </form> diff --git a/apps/user_ldap/templates/wizard-container.php b/apps/user_ldap/templates/wizard-container.php new file mode 100644 index 00000000000..fbfa8899de6 --- /dev/null +++ b/apps/user_ldap/templates/wizard-container.php @@ -0,0 +1,3 @@ +<form id="ldapWizard" class="section" action="#" method="post"> + <h2><?php p($l->t('LDAP2')); ?></h2> +</form>
\ No newline at end of file |