-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow enforcing share passwords only when already asking for a password #38227
Merged
nickvergessen
merged 7 commits into
master
from
allow-enforcing-share-passwords-only-when-already-asking-for-a-password
May 22, 2023
Merged
Allow enforcing share passwords only when already asking for a password #38227
nickvergessen
merged 7 commits into
master
from
allow-enforcing-share-passwords-only-when-already-asking-for-a-password
May 22, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danxuliu
requested review from
jancborchardt,
Pytal,
a team,
susnux and
nfebe
and removed request for
a team
May 12, 2023 16:57
jancborchardt
approved these changes
May 15, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok design-wise! We don't use new components here yet though, right? Looks a bit cramped – but separate topic.
Merged
Pytal
approved these changes
May 18, 2023
So rebase and then merge? |
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The rest of "<br/>" elements in the file appear immediately after their previous "</label>" rather than in a new line. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
The permitted contents of a paragraph are only phrasing contents, so "div" elements can not be used, although "span" can. Besides being invalid HTML it seems that the browser ends the paragraph at the div, so the label/input that appears after it is treated as being in a new paragraph, which is not indented by default, and thus is not aligned with the rest of its sibling inputs. Note that an additional div is nevertheless added once the page is loaded to be able to select the groups, but this one does not break its parent paragraph (maybe due to being added after the page load, but I do not really know). Nevertheless, it needs to be explicitly indented, and the second indentend wrapper needs to be removed, as it affects only the label but not the div/input, and therefore the label had an extra indentation over the input. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
"Enforce password protection" is a subcase of "Always ask for a password", so it should be indented to visually show the dependency. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
"Enforce password protection" is a subcase of "Always ask for a password", so it should be disabled if its parent option is unchecked. Although other dependant options in the sharing settings are fully hidden instead of just disabled this option is disabled but shown to avoid confusion when updating from a previous Nextcloud version where "Always ask for a password" was unchecked and "Enforce password protection" was checked. Besides that, due to their dependency the enforced password protection is now automatically unchecked too if its parent option is unchecked. Finally, the groups excluded from password requirements are also disabled when "Always ask for a password" is unchecked, as they might be still shown if "Enforce password protection" was checked due to an update from a previous version. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
nickvergessen
force-pushed
the
allow-enforcing-share-passwords-only-when-already-asking-for-a-password
branch
from
May 22, 2023 10:47
caf03b5
to
c1f3bcf
Compare
nickvergessen
deleted the
allow-enforcing-share-passwords-only-when-already-asking-for-a-password
branch
May 22, 2023 12:06
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In admin Sharing settings,
Enforce password protection
is a subcase ofAlways ask for a password
, so it should be:Always ask for a password
is not checkedNote that in the Sharing settings other dependant options are fully hidden rather than just disabled when their parent is unchecked. However, existing instances could have
Enforce password protection
checked andAlways ask for a password
unchecked, so if admins are not aware of this change it could be confusing for them ifEnforce password protection
is fully gone after updating Nextcloud to the next version.Alternatively (or in addition) some kind of migration could be applied to automatically enable
Always ask for a password
ifEnforce password protection
was checked, but I was not sure where or how to add it.Besides that change the markup was fixed, as showing
Exclude groups from password requirements
causedSet default expiration date
to be wrongly indented (apparently due to using adiv
inside ap
, which is not allowed, as only phrasing content should be used in paragraphs).🖼️ Screenshots
How to test (scenario 1)
sharing.allow_disabled_password_enforcement_groups => true,
inconfig/config.php
Enforce password protection
Result with this pull request
Set default expiration date
is properly indentedResult without this pull request
Set default expiration date
has no indentation and appears as a sibling ofAllow users to share via link and emails
instead of a childHow to test (scenario 2)
Always ask for a password
Result with this pull request
Enforce password protection
is enabled whenAlways ask for a password
is checked, and disabled when it is notResult without this pull request
Enforce password protection
does not change