Open
Conversation
4170eff to
9afd076
Compare
Contributor
attaching sources to a backend doesn't need admin scope. fine to let users view the backends as readonly. |
Ziinc
approved these changes
Dec 31, 2025
lib/logflare/teams/team_context.ex
Outdated
Comment on lines
54
to
58
| def team_owner?(%__MODULE__{team: team, user: user, team_user: nil}), | ||
| do: team_owner?(team, user.email) | ||
|
|
||
| def team_owner?(%__MODULE__{}), do: false | ||
|
|
Contributor
There was a problem hiding this comment.
this will change under #3043 from my understanding?
Contributor
Author
There was a problem hiding this comment.
Yes, we can change to team_admin?
| @admin_scope in String.split(scopes) | ||
| end | ||
|
|
||
| def can_create_admin_token?(%OauthAccessToken{scopes: nil}), do: false |
Contributor
There was a problem hiding this comment.
Suggested change
| def can_create_admin_token?(%OauthAccessToken{scopes: nil}), do: false | |
| def can_create_admin_token?(_), do: false |
9afd076 to
1ffc1fe
Compare
1ffc1fe to
9604375
Compare
9604375 to
2da3bee
Compare
15f66cd to
6986bf9
Compare
6986bf9 to
3abc904
Compare
3abc904 to
647008c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?