Skip to content

Ldap agent credentials save - #5568

Merged
LukasReschke merged 7 commits into
masterfrom
ldap-agent-credentials-safe
Nov 9, 2017
Merged

Ldap agent credentials save#5568
LukasReschke merged 7 commits into
masterfrom
ldap-agent-credentials-safe

Conversation

@blizzz

Copy link
Copy Markdown
Member

Fixes#4476

Some notes, first about the GUI. @nextcloud/designers !

spectacle v18547

The Save Credentials button is new, now, and always enabled (since you can allow anonymous access to LDAP). Imho it is not clear the this button must be pressed on changes to the DN or password. Also, it feels to dense. Possible enhancements:

  • have a border around the DN, Password and Save button
  • disable button if dn+pw were not changed, but pretty useless with browser auto-complete. Nevertheless migth still be a good idea.

What do you think? If you have other suggestions, appreciated.

Second, some technical notes:

  • This also fixes a minor (i believe downstreamed) bug
  • When saving LDAP config only actualy changes are written (previously everything)
  • The wizard and endpoints only support saving one change a time. Which is annoying in this case, but works so far. Fixing this, requires some more changes that are out of bounds for this PR (cf. TODO in wizardTabGeneric.js)

@nextcloud/ldap

@enoch85

Copy link
Copy Markdown
Member

Nice fix! This was somewhat confusing before. 👍

@blizzzblizzz changed the title Ldap agent credentials safeLdap agent credentials saveJun 30, 2017
@jancborchardt

Copy link
Copy Markdown
Member

Two pieces of feedback:

have a border around the DN, Password and Save button

I don’t know what DN is (let’s avoid technical jargon), but can we put the DN field and password field next to each other at half width, and put the save button next to it? Then it seems more like a unit.

Also, if the credentials were changed, we could give the button a class="primary" – only when changed! Additionally the Continue button should get that class too.

@blizzz

Copy link
Copy Markdown
MemberAuthor

I don’t know what DN is (let’s avoid technical jargon), but can we put the DN field and password field next to each other at half width, and put the save button next to it? Then it seems more like a unit.

The "Distinguished Name" (sort of user identifier) can be quite long. Today I saw one that already does not fit into this size. Can be done, but perhaps not that user friendly.

Also, if the credentials were changed, we could give the button a class="primary" – only when changed! Additionally the Continue button should get that class too.

That class is news to me, what does it do? Certainly possible.

@jancborchardt

Copy link
Copy Markdown
Member

That class is news to me, what does it do?

Makes the button blue (or the color of theming). Used on primary buttons like the log in button, or »Choose file« in the file picker, Reply/Send in the Mail app etc.

@blizzz

Copy link
Copy Markdown
MemberAuthor

Makes the button blue (or the color of theming). Used on primary buttons like the log in button, or »Choose file« in the file picker, Reply/Send in the Mail app etc.

Uh, this requires additional logic for enter buttons presses, etc.? → out of scope for this PR

@codecov

codecovBot commented Jul 5, 2017

Copy link
Copy Markdown

Codecov Report

Merging #5568 into master will increase coverage by <.01%.
The diff coverage is 11.11%.

@@ Coverage Diff @@## master #5568 +/- ##
============================================
+ Coverage 52.82% 52.83% +<.01% 
Complexity 22802 22802 ============================================
Files 1442 1442 Lines 88562 88567 +5 Branches 1349 1349 ============================================
+ Hits 46787 46792 +5 
Misses 41775 41775
Impacted FilesCoverage ΔComplexity Δ
apps/user_ldap/templates/part.wizard-server.php0% <0%> (ø)0 <0> (ø)⬇️
apps/user_ldap/lib/Connection.php57.55% <0%> (ø)119 <0> (+1)⬆️
apps/user_ldap/lib/Configuration.php41.91% <25%> (+0.4%)85 <0> (-1)⬇️
lib/private/Files/Cache/Propagator.php96.2% <0%> (+1.26%)16% <0%> (ø)⬇️

@blizzz

Copy link
Copy Markdown
MemberAuthor

I don’t know what DN is (let’s avoid technical jargon), but can we put the DN field and password field next to each other at half width, and put the save button next to it? Then it seems more like a unit.

The "Distinguished Name" (sort of user identifier) can be quite long. Today I saw one that already does not fit into this size. Can be done, but perhaps not that user friendly.

I added now some whitespace instead:

spectacle m26685

@blizzzblizzz added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jul 5, 2017
@jancborchardt

Copy link
Copy Markdown
Member

Uh, this requires additional logic for enter buttons presses, etc.? → out of scope for this PR

No, not sure what you mean. You simply add class="primary" to the button element. Try it out. :)

@blizzz

Copy link
Copy Markdown
MemberAuthor

Uh, this requires additional logic for enter buttons presses, etc.? → out of scope for this PR

No, not sure what you mean. You simply add class="primary" to the button element. Try it out. :)

I'd expect besides a nice color, there is also a shortcut connected to it (e.g. pressing Enter). Maybe my expectations are wrong.

Anyway, these buttons are styled by jQ-UI (i hear you sighing) and thus the primary class values are not respected. I have no idea how to un-jq-ui-fy them (only how to make it bad diffrenetly), other than theming it. Which could not reuse primary either.

Leaves duplicating the primary class code to the ldap css 🙊 and add important over it.

Proper solution is to get rid of the jQuery in general and transform the wizard to the tab-less approach. But this isn't done quickly and i won't have resources for it before Sep.

@jancborchardt

Copy link
Copy Markdown
Member

I'd expect besides a nice color, there is also a shortcut connected to it (e.g. pressing Enter). Maybe my expectations are wrong.

That has to be done either by proper HTML (putting it as the main input type="submit" in the <form>, I think), or failing that, Javascript.
What I was talking about is simply to highlight the button so people know the »Continue« button floating in mid-air is the main action button.

@blizzz

Copy link
Copy Markdown
MemberAuthor

Added it the ugly way without the buttons magic.

With changed DN or Pwd:

spectacle ab2914

Continue button is always primary, when disabled it looks like:

spectacle zm2914

@jancborchardt

Copy link
Copy Markdown
Member

Alright, looks good. :) But ideally there should only be one primary button at a time. That's why it's called primary. ;)

@blizzz

Copy link
Copy Markdown
MemberAuthor

Alright, looks good. :) But ideally there should only be one primary button at a time. That's why it's called primary. ;)

OK, i take the feature out of the bug fix and finish that when i am back end of Aug.

@blizzz
blizzzforce-pushed the ldap-agent-credentials-safe branch from d358557 to a8c6d07CompareJuly 17, 2017 10:10
@jancborchardt

Copy link
Copy Markdown
Member

Just make only the continue button primary.

@blizzz

Copy link
Copy Markdown
MemberAuthor

Just make only the continue button primary.

Feature nevertheless ;)

This goes to #5749

Thus, there should not be a blocker anymore. Final reviews, por favore?

@blizzzblizzz added the bug label Jul 17, 2017
@blizzz
blizzzforce-pushed the ldap-agent-credentials-safe branch from a8c6d07 to a30ff24CompareSeptember 7, 2017 13:29
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
(…in a stupid way)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
@MorrisJobke
MorrisJobkeforce-pushed the ldap-agent-credentials-safe branch from a30ff24 to 7b0868dCompareOctober 27, 2017 12:25
@MorrisJobke

Copy link
Copy Markdown
Member

Rebased.

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works and looks good with the latest style updates to the LDAP wizard in master. 👍

@MorrisJobke

Copy link
Copy Markdown
Member

@nextcloud/ldap Final review please :)

@LukasReschke
LukasReschke merged commit 2bfa1ce into masterNov 9, 2017
@MorrisJobke
MorrisJobke deleted the ldap-agent-credentials-safe branch November 14, 2017 13:11
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove autosave from LDAP and add a save button

5 participants

@blizzz@enoch85@jancborchardt@MorrisJobke@LukasReschke