-
Notifications
You must be signed in to change notification settings - Fork 74
feat: admin API scope #3040
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: main
Are you sure you want to change the base?
feat: admin API scope #3040
Conversation
4170eff to
9afd076
Compare
attaching sources to a backend doesn't need admin scope. fine to let users view the backends as readonly. |
lib/logflare/teams/team_context.ex
Outdated
| def team_owner?(%__MODULE__{team: team, user: user, team_user: nil}), | ||
| do: team_owner?(team, user.email) | ||
|
|
||
| def team_owner?(%__MODULE__{}), do: false | ||
|
|
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.
this will change under #3043 from my understanding?
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.
Yes, we can change to team_admin?
| @admin_scope in String.split(scopes) | ||
| end | ||
|
|
||
| def can_create_admin_token?(%OauthAccessToken{scopes: nil}), do: false |
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.
| def can_create_admin_token?(%OauthAccessToken{scopes: nil}), do: false | |
| def can_create_admin_token?(_), do: false |
9afd076 to
1ffc1fe
Compare
Follows on from #3039
private:adminscope is required to create, delete, or update a teamprivate:adminscope is required for create, read, update, delete of backendsNeed clarification on:
/api/sources/:token/backends/:backend_tokenrequire admin scope?