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

New: adds a document denied redirect page setting #587

Merged
merged 12 commits into from
Sep 1, 2023

Conversation

alexmigf
Copy link
Member

@alexmigf alexmigf commented Aug 24, 2023

closes #586

This PR adds a new selector for a document access denied redirect page in the frontend:

Screenshot from 2023-08-24 12-28-05

Instead of dying immediately. Other options are:

  • Login page
  • My Account page
  • Custom page

includes/class-wcpdf-endpoint.php Outdated Show resolved Hide resolved
includes/wcpdf-functions.php Show resolved Hide resolved
includes/class-wcpdf-main.php Outdated Show resolved Hide resolved
includes/class-wcpdf-main.php Outdated Show resolved Hide resolved
@alexmigf alexmigf requested a review from MohamadNateqi August 25, 2023 09:15
Copy link
Contributor

@MohamadNateqi MohamadNateqi left a comment

Choose a reason for hiding this comment

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

Perfect!

@dwalkerpriv
Copy link
Contributor

Whatever access type I select with a custom link, it redirects me to the login page.

Screenshot 2023-08-25 120700

When I have access type of 'Full' or 'Logged in' without a custom link, I can download the PDF. But if i change the permission to 'Guest' without a custom link, i get the no permission page.

includes/class-wcpdf-endpoint.php Outdated Show resolved Hide resolved
@alexmigf
Copy link
Member Author

@dwalkerpriv external links are not allowed, could you try with a store frontend link?

Copy link
Contributor

@dwalkerpriv dwalkerpriv left a comment

Choose a reason for hiding this comment

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

Works as intended this time. I didn't notice the description about using frontend pages

@alexmigf
Copy link
Member Author

Works as intended this time. I didn't notice the description about using frontend pages

Actually I added today after your comment :)

Copy link
Contributor

@YordanSoares YordanSoares left a comment

Choose a reason for hiding this comment

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

@alexmigf now it works well!

However, I think we should move the "Custom external URLs not allowed." text to the custom URL input, like this:

image

What do you think?

Copy link
Contributor

@YordanSoares YordanSoares left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@alexmigf alexmigf merged commit 44c0ee4 into main Sep 1, 2023
@alexmigf alexmigf deleted the 568-document-denied-redirect-setting branch September 1, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom frontend redirect page setting for when document access not allowed
4 participants