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
3f57a81c
Commit
3f57a81c
authored
Mar 13, 2019
by
Leonard Gram
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teams: cleanup.
parent
ccfd6789
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
pkg/api/team_members.go
+3
-6
No files found.
pkg/api/team_members.go
View file @
3f57a81c
...
...
@@ -31,16 +31,13 @@ func GetTeamMembers(c *m.ReqContext) Response {
// POST /api/teams/:teamId/members
func
AddTeamMember
(
c
*
m
.
ReqContext
,
cmd
m
.
AddTeamMemberCommand
)
Response
{
teamId
:=
c
.
ParamsInt64
(
":teamId"
)
orgId
:=
c
.
OrgId
cmd
.
OrgId
=
c
.
OrgId
cmd
.
TeamId
=
c
.
ParamsInt64
(
":teamId"
)
if
err
:=
teamguardian
.
CanAdmin
(
orgId
,
t
eamId
,
c
.
SignedInUser
);
err
!=
nil
{
if
err
:=
teamguardian
.
CanAdmin
(
cmd
.
OrgId
,
cmd
.
T
eamId
,
c
.
SignedInUser
);
err
!=
nil
{
return
Error
(
403
,
"Not allowed to add team member"
,
err
)
}
cmd
.
TeamId
=
teamId
cmd
.
OrgId
=
orgId
if
err
:=
bus
.
Dispatch
(
&
cmd
);
err
!=
nil
{
if
err
==
m
.
ErrTeamNotFound
{
return
Error
(
404
,
"Team not found"
,
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