mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
teams: cleanup.
This commit is contained in:
@@ -64,13 +64,13 @@ type GetTeamMembersQuery struct {
|
||||
// Projections and DTOs
|
||||
|
||||
type TeamMemberDTO struct {
|
||||
OrgId int64 `json:"orgId"`
|
||||
TeamId int64 `json:"teamId"`
|
||||
UserId int64 `json:"userId"`
|
||||
External bool `json:"-"`
|
||||
Email string `json:"email"`
|
||||
Login string `json:"login"`
|
||||
AvatarUrl string `json:"avatarUrl"`
|
||||
Labels []string `json:"labels"`
|
||||
Permission int64 `json:"permission"`
|
||||
OrgId int64 `json:"orgId"`
|
||||
TeamId int64 `json:"teamId"`
|
||||
UserId int64 `json:"userId"`
|
||||
External bool `json:"-"`
|
||||
Email string `json:"email"`
|
||||
Login string `json:"login"`
|
||||
AvatarUrl string `json:"avatarUrl"`
|
||||
Labels []string `json:"labels"`
|
||||
Permission PermissionType `json:"permission"`
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ func CanAdmin(orgId int64, teamId int64, user *m.SignedInUser) error {
|
||||
}
|
||||
|
||||
for _, member := range cmd.Result {
|
||||
if member.UserId == user.UserId && member.Permission == int64(m.PERMISSION_ADMIN) {
|
||||
if member.UserId == user.UserId && member.Permission == m.PERMISSION_ADMIN {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ func TestUpdateTeam(t *testing.T) {
|
||||
OrgId: testTeam.OrgId,
|
||||
TeamId: testTeam.Id,
|
||||
UserId: editor.UserId,
|
||||
Permission: int64(m.PERMISSION_ADMIN),
|
||||
Permission: m.PERMISSION_ADMIN,
|
||||
}}
|
||||
return nil
|
||||
})
|
||||
@@ -67,7 +67,7 @@ func TestUpdateTeam(t *testing.T) {
|
||||
OrgId: testTeamOtherOrg.OrgId,
|
||||
TeamId: testTeamOtherOrg.Id,
|
||||
UserId: editor.UserId,
|
||||
Permission: int64(m.PERMISSION_ADMIN),
|
||||
Permission: m.PERMISSION_ADMIN,
|
||||
}}
|
||||
return nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user