Commit ccfd6789 by Leonard Gram

teams: cleanup.

parent fc046113
......@@ -72,5 +72,5 @@ type TeamMemberDTO struct {
Login string `json:"login"`
AvatarUrl string `json:"avatarUrl"`
Labels []string `json:"labels"`
Permission int64 `json:"permission"`
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