Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
ccfd6789
Commit
ccfd6789
authored
Mar 13, 2019
by
Leonard Gram
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teams: cleanup.
parent
fc046113
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
pkg/models/team_member.go
+1
-1
pkg/services/teamguardian/team.go
+1
-1
pkg/services/teamguardian/teams_test.go
+2
-2
No files found.
pkg/models/team_member.go
View file @
ccfd6789
...
...
@@ -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"`
}
pkg/services/teamguardian/team.go
View file @
ccfd6789
...
...
@@ -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
}
}
...
...
pkg/services/teamguardian/teams_test.go
View file @
ccfd6789
...
...
@@ -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
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment