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

[Bugfix] Endpoints Permissions | Create Expense Category & Create Task Status #1753

Merged
merged 7 commits into from
May 29, 2024

Conversation

Civolilah
Copy link
Collaborator

@beganovich @turbo124 The PR includes two fixes for the /api/v1/task_statuses/create endpoint and /api/v1/expense_categories/create endpoint. These changes ensure that only users with at least ADMIN permissions, can create these entities. The client experienced a toaster message indicating that the action was not authorized because they assigned view/edit/create permissions without setting the user to be an admin. This was the reason for the toaster issue. Let me know your thoughts.

@turbo124
Copy link
Member

turbo124 commented May 8, 2024

@Civolilah just to note, this issue impacts all routes where the user only have view permissions, the UI appears to always call the /create endpoint regardless of permission levels so this PR should be upgraded to cover all /create endpoints please

@Civolilah
Copy link
Collaborator Author

@Civolilah just to note, this issue impacts all routes where the user only have view permissions, the UI appears to always call the /create endpoint regardless of permission levels so this PR should be upgraded to cover all /create endpoints please

@turbo124 I just checked all of them. Most of them were resolved when I was working on the permissions adjustment. However, three of them still missed the permission check, so I've just added it. So, basically, the queries that require create permission have a check, and also queries that require at least admin permission also have a check. Let me know your thoughts.

@beganovich
Copy link
Member

@turbo124 is this ready for merge?

@beganovich beganovich merged commit 0dc55f5 into invoiceninja:develop May 29, 2024
2 of 3 checks passed
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.

None yet

3 participants