Skip to content
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

Fix password handling in public links #2117

Merged
merged 2 commits into from
Oct 10, 2019

Conversation

felixheidecke
Copy link
Contributor

Description

  • Immediate icon change if the link is protected (or not)
  • Allow removing the password from the form.

Related Issue

Motivation and Context

See issues

How Has This Been Tested?

Manual test

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

<input type="password" autocomplete="new-password" class="uk-input" :class="{ 'uk-form-danger': !$_passwordIsValid }" v-model="password" :placeholder="hasPassword && password === null? '********' : placeholder.password" id="oc-files-file-link-password" />
<div class="uk-position-relative">
<input type="password" autocomplete="new-password" class="uk-input" :class="{ 'uk-form-danger': !$_passwordIsValid }" v-model="password" :placeholder="hasPassword && password === null? '********' : placeholder.password" id="oc-files-file-link-password" />
<div uk-close v-if="!$_passwordEnforced && hasPassword && password!=''" class="uk-position-small uk-position-center-right oc-cursor-pointer" @click="password=''" :uk-tooltip="$_passwordRemoveText" />
Copy link
Contributor

Choose a reason for hiding this comment

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

seems the _passwordEnforced condition does not do anything.

I tried enforcing password only for the "Editor" role and the cross was still visible to discard the password.

Maybe the _passwordEnforced function is not working ? As I can see it's not using proper bitmasks...

@PVince81
Copy link
Contributor

PVince81 commented Oct 8, 2019

Tested, all works except for the password enforced bit.

Still, even without that, an error message is properly displayed in case I try to save a link without password while password is enforced. So merging this even without the check would be fine by me for now...

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍 let's merge this anyway as it fixes the issue.

We're going to cover password enforcement with tests separately so we can revisit the solution if needed

@PVince81 PVince81 merged commit d1b7867 into master Oct 10, 2019
@delete-merged-branch delete-merged-branch bot deleted the bugfix/conditional-icon-rendering branch October 10, 2019 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p3-medium Normal priority Type:Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lock icon of a public link is not updated immediately password of a public link cannot be removed
2 participants