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

[full-ci] Honour routes' auth config #7864

Closed
wants to merge 2 commits into from
Closed

Conversation

diocas
Copy link
Contributor

@diocas diocas commented Oct 25, 2022

Fixes #7863

Ensures that routes marked with auth: false do not require a user login.

@diocas
Copy link
Contributor Author

diocas commented Oct 25, 2022

This is not ok.. trying to understand if I can improve it, otherwise will close it.

@ownclouders
Copy link
Contributor

ownclouders commented Oct 25, 2022

Results for oC10IntegrationApp1 https://drone.owncloud.com/owncloud/web/29397/73/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUIPrivateLinks-accessingPrivateLinks_feature-L17.png

webUIPrivateLinks-accessingPrivateLinks_feature-L17.png

@diocas
Copy link
Contributor Author

diocas commented Oct 25, 2022

Sorry, pushed some leftovers.. Let's see how it behaves now.

@kulmann I believe this breaks what you said in the issue ("interpret the absence of a contextRoute (and not having meta.auth on the target route) as requiring a login"), but I could perhaps replace:

  if (to.meta?.auth !== false) {
    return true
  }

with:

  if (to.meta?.auth === false) {
   return false
 }

or:

 if (to.meta) {
   return to.meta.auth !== false
 }

instead.
This might be the best solution, what do you think?

@sonarcloud
Copy link

sonarcloud bot commented Oct 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@diocas
Copy link
Contributor Author

diocas commented Nov 1, 2022

Replaced with different approach (#7875)

@diocas diocas closed this Nov 1, 2022
@diocas diocas deleted the up_7863 branch November 1, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Routes auth config not honoured
2 participants