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

[app] Fix Permission Handling for Apps and Teams #395

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

ricoberger
Copy link
Member

This commit fixes a bug in the permission handling for applications and
teams. Because we not only checked the "all" query parameter in the
corresponding routes, it could happen that we return all applications /
teams, when a user just wants to see his own applications / teams.

We are now just checking if the "all" query parameter is true to set the
teams to "nil". For all other use cases we are directly using the teams
form the authenticated user object.

When authentication is disabled or when no team header is present the
teams for the user are automatically set to "nil" so that the other
checks are not necessary anymore.

This commit fixes a bug in the permission handling for applications and
teams. Because we not only checked the "all" query parameter in the
corresponding routes, it could happen that we return all applications /
teams, when a user just wants to see his own applications / teams.

We are now just checking if the "all" query parameter is true to set the
teams to "nil". For all other use cases we are directly using the teams
form the authenticated user object.

When authentication is disabled or when no team header is present the
teams for the user are automatically set to "nil" so that the other
checks are not necessary anymore.
@ricoberger ricoberger merged commit a8a71d8 into main Jul 18, 2022
@ricoberger ricoberger deleted the fix-permission-handling-for-applications-and-teams branch July 18, 2022 14:56
@ricoberger ricoberger added the changelog: fixed Something which wasn't working is fixed label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: fixed Something which wasn't working is fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant