-
Notifications
You must be signed in to change notification settings - Fork 461
Implement authentication for the assignment API #18785
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
base: master
Are you sure you want to change the base?
Implement authentication for the assignment API #18785
Conversation
| @@ -1,4 +1,5 @@ | |||
| class AssignmentsController < ApplicationController | |||
| before_action :require_admin, only: %i[create destroy] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danidoni I think the assignment policy should be used instead
| def create? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I'll fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I don't think you are right. You can create an assignment (assingn someone) if you have a relationship with the Project/Package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the policy is missing to authorize the assigner... that should be there IMO, talking to @hellcp-work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hennevogel alright, but what this policy is doing is assigning someone if that someone is a collaborator, am I reading it right? In other words, if the assignee is a collaborator, but what you say is that the assigner is a collaborator, that is not what this policy is doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danidoni @hennevogel that should be the change that is required #18791
No description provided.