mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Service accounts: Add service account to teams (#51536)
* Revert "Serviceaccounts: #48995
Do not display service accounts assigned to team (#48995)"
This reverts commit cbf71fbd7f.
* fix: test to not include more actions than necessary
* adding service accounts to teams - backend and frontend changes
* also support SA addition through the old team membership endpoints
* fix tests
* tests
* serviceaccounts permission tests
* serviceaccounts permission service tests run
* added back test that was removed by accident
* lint
* refactor: add testoptionsTeams
* fix a bug
* service account picker change
* explicitly set SA managed permissions to false for dash and folders
* lint
* allow team creator to list service accounts
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
This commit is contained in:
@@ -222,20 +222,21 @@ type ScopeParams struct {
|
||||
// ResourcePermission is structure that holds all actions that either a team / user / builtin-role
|
||||
// can perform against specific resource.
|
||||
type ResourcePermission struct {
|
||||
ID int64
|
||||
RoleName string
|
||||
Actions []string
|
||||
Scope string
|
||||
UserId int64
|
||||
UserLogin string
|
||||
UserEmail string
|
||||
TeamId int64
|
||||
TeamEmail string
|
||||
Team string
|
||||
BuiltInRole string
|
||||
IsManaged bool
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
ID int64
|
||||
RoleName string
|
||||
Actions []string
|
||||
Scope string
|
||||
UserId int64
|
||||
UserLogin string
|
||||
UserEmail string
|
||||
UserIsServiceAccount bool
|
||||
TeamId int64
|
||||
TeamEmail string
|
||||
Team string
|
||||
BuiltInRole string
|
||||
IsManaged bool
|
||||
Created time.Time
|
||||
Updated time.Time
|
||||
}
|
||||
|
||||
func (p *ResourcePermission) Contains(targetActions []string) bool {
|
||||
|
||||
Reference in New Issue
Block a user