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

Release page content is not visible for public users #55

Closed
rioksane opened this issue Dec 8, 2022 · 11 comments
Closed

Release page content is not visible for public users #55

rioksane opened this issue Dec 8, 2022 · 11 comments

Comments

@rioksane
Copy link
Collaborator

rioksane commented Dec 8, 2022

Release page content is not visible for public users:
https://beta.plone.org/download/releases/6.0.0rc2

Only title is visible if you are not logged in.

Screenshot 2022-12-08 at 17 36 06

@ericof
Copy link
Member

ericof commented Dec 8, 2022

Additional information

There is a 401 call to https://beta.plone.org/++api++/download/releases/6.0.0rc2/@types/plonerelease

@mauritsvanrees
Copy link
Member

For me it only seems to be working. It seems like I am anonymous, there is nothing that indicates otherwise, but apparently I am logged in, which is why I can see the text.
When I open the page in the same browser in a private tab, I only see the title.

@mauritsvanrees
Copy link
Member

Ah, that may be because at some point I was also logged in at the ClassicUI level. That may trip up some authentication logic.

@mauritsvanrees

This comment was marked as off-topic.

@mauritsvanrees
Copy link
Member

mauritsvanrees commented Dec 8, 2022

BTW, the anonymous contents of https://beta.plone.org/++api++/download/releases/5.2.10 look fine: they contain all the necessary information to show on this page. But the 401 for some other urls might trip this up after all.

@davisagli
Copy link
Member

Part of what is happening here is that the default schema-based view in volto depends on the /@types REST API endpoint, and it appears that that is not public.

I think it should be, based on the zope2.View permission in the ZCML: https://github.com/plone/plone.restapi/blob/master/src/plone/restapi/services/types/configure.zcml#L11

Ah, but the view code itself does an explicit check that the user is logged in: https://github.com/plone/plone.restapi/blob/master/src/plone/restapi/services/types/get.py#L23

It's a pity this is not checking a permission, which would make it easier to change the policy.

Possible short-term workarounds I can think of:

  1. Monkey patch plone.restapi.services.types.get.check_security to be a function that does nothing (after verifying that the types info doesn't have any confidential information)
  2. Override this service on a browser layer with a version that doesn't do the check.
  3. Write a custom view for this type that doesn't need to fetch the schema

@davisagli
Copy link
Member

Related to plone/plone.restapi#1409

@davisagli
Copy link
Member

Fixed in #56, works now.

@mauritsvanrees do you want to create a separate issue about the Files field?

@mauritsvanrees
Copy link
Member

mauritsvanrees commented Dec 8, 2022

@davisagli Thanks!
Let's close this issue once the fix is live.

I have split off the look of Files in a separate issue: #57
[Edit: I have hidden my comment about it here as off-topic.]

@davisagli
Copy link
Member

@mauritsvanrees I think this was already deployed as soon as #56 was merged.

@mauritsvanrees
Copy link
Member

I was just about to type something like that, as it seems to be working now. :-)

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

No branches or pull requests

4 participants