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

[studio] Add Content-Type response header to StudioAccessDeniedHandler #4357

Closed
yacdaniel opened this issue Oct 15, 2020 · 3 comments
Closed

Comments

@yacdaniel
Copy link
Member

yacdaniel commented Oct 15, 2020

Describe the bug

When a site is created using /api/1/site/create.json and the user doesn't have permissions to create a site the response doesn't contain the Content-Type header. This is causing some issues while using the craftercms CLI.

To Reproduce

Steps to reproduce the behavior:

  1. Create a user and don't assign any group.
  2. Create a site using /api/1/site/create.json with the previous user.
  3. See response headers

Expected behavior

Content-Type: application/json should be returned in the header when user is not authorized. https://github.com/craftercms/studio/blob/develop/src/main/java/org/craftercms/studio/impl/v1/web/security/access/StudioAccessDeniedHandler.java

Screenshots

image

Logs

N/A

Specs

Version

3.1.x & 3.2.x

OS

Any

Browser

Any

Additional context

N/A

@dejan-brkic
Copy link
Member

@dejan-brkic dejan-brkic moved this from Backlog to Test & Validate in Crafter CMS v4 Oct 22, 2020
@dejan-brkic dejan-brkic moved this from Backlog to Test & Validate in Crafter CMS v3.1 Oct 22, 2020
@dejan-brkic dejan-brkic assigned yacdaniel and unassigned dejan-brkic Oct 22, 2020
@sumerjabri sumerjabri moved this from Test & Validate to Completed in Crafter CMS v3.1 Nov 16, 2020
@sumerjabri
Copy link
Member

Validated in 3.1.x

@yacdaniel
Copy link
Member Author

Verified fixed in 3.2.x

Crafter CMS v4 automation moved this from Test & Validate to Completed Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Crafter CMS v4
  
Completed
Crafter CMS v3.1
  
Completed
Development

No branches or pull requests

3 participants