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

Refine Authorization Logic for User Intro Data Access #2081

Open
10 tasks
Achintya-Chatterjee opened this issue Aug 19, 2024 · 0 comments · May be fixed by #2080
Open
10 tasks

Refine Authorization Logic for User Intro Data Access #2081

Achintya-Chatterjee opened this issue Aug 19, 2024 · 0 comments · May be fixed by #2080
Assignees

Comments

@Achintya-Chatterjee
Copy link
Member

Issue Description

The current authorization logic on the /users/:userId/intro endpoint only allows superusers to view user intro data. This restriction is too broad and prevents users from accessing their own intro data.

The proposed change will:

  • Allow users to view their own intro data.
  • Retain the ability of superusers to access any user's intro data.
  • Implement a 403 error response for unauthorized access attempts.

Expected Behavior

  • Users should be able to access their own intro data.
  • Superusers should continue to have access to all users' intro data.
  • If a user tries to access another user's intro data without superuser privileges, they should receive a 403 "You're not authorized to view this page" response.
  • A 404 response should be returned if no data is found for the given user ID.

Current Behavior

Only superusers can access the intro data for any user. Regular users are unable to view their own intro data.

Screenshots

Reproducibility

  • This issue is reproducible
  • This issue is not reproducible

Steps to Reproduce

Severity/Priority

  • Critical
  • High
  • Medium
  • Low

Additional Information

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.
@Achintya-Chatterjee Achintya-Chatterjee self-assigned this Aug 19, 2024
@Achintya-Chatterjee Achintya-Chatterjee linked a pull request Aug 19, 2024 that will close this issue
10 tasks
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 a pull request may close this issue.

1 participant