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

Return an error when trying to access the pas views from the web #95

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

ale-rt
Copy link
Member

@ale-rt ale-rt commented Dec 20, 2024

@mister-roboto
Copy link

@ale-rt thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@ale-rt
Copy link
Member Author

ale-rt commented Dec 20, 2024

@jenkins-plone-org please run jobs

@ale-rt
Copy link
Member Author

ale-rt commented Jan 8, 2025

The failing jobs are not present anymore:
Plone Jenkins CI - pull-request-6.0-3.11 — Job finished with error status
Plone Jenkins CI - pull-request-6.1-3.12 — Job finished with error status

@ale-rt ale-rt merged commit 87e119d into master Jan 20, 2025
14 of 16 checks passed
@ale-rt ale-rt deleted the remove-allowed-interface branch January 20, 2025 13:51
@ale-rt
Copy link
Member Author

ale-rt commented Jan 20, 2025

Thanks @gforcada

@@ -38,3 +39,6 @@ def hasOpenIDExtractor(self):
def hasOpenIDdExtractor(self):
# BBB Keeping method name with typo for backwards compatibility.
return self.hasOpenIDExtractor()

def __call__(self):
raise HTTPImATeapot("View not callable")
Copy link
Member

@jensens jensens Jan 22, 2025

Choose a reason for hiding this comment

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

Well, it is not a Teapot but a CMS, so no RFC conform usage here!

https://www.rfc-editor.org/rfc/rfc2324#section-2.3.2

The HTTP 418 I'm a teapot status response code indicates that the server refuses to brew coffee because it is, permanently, a teapot. A combined coffee/tea pot that is temporarily out of coffee should instead return 503.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418

Copy link
Member Author

Choose a reason for hiding this comment

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

If you want another status code to be returned, tell me and I will change it.
The important thing is to stop these views to be accessible from the web.

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.

5 participants