Commit ccfd6789 by Leonard Gram

teams: cleanup.

parent fc046113
......@@ -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
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment