Reference known issue #2601 in Admin creating SuperAdmin response

Signed-off-by: Michael de Sa <mjdesa@gmail.com>
pull/10616/head
Jared Scheib 2017-12-15 15:05:27 -08:00 committed by Michael de Sa
parent ad22233adb
commit fbc224107e
3 changed files with 4 additions and 4 deletions

View File

@ -401,7 +401,7 @@ func TestServer(t *testing.T) {
body: ` body: `
{ {
"code": 401, "code": 401,
"message": "User does not have authorization required to set SuperAdmin status" "message": "User does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/chronograf/issues/2601 for more information."
}`, }`,
}, },
}, },

View File

@ -324,7 +324,7 @@ func setSuperAdmin(ctx context.Context, req userRequest, user *chronograf.User)
} else if !isSuperAdmin && (user.SuperAdmin != req.SuperAdmin) { } else if !isSuperAdmin && (user.SuperAdmin != req.SuperAdmin) {
// If req.SuperAdmin has been set, and the request was not made with the SuperAdmin // If req.SuperAdmin has been set, and the request was not made with the SuperAdmin
// context, return error // context, return error
return fmt.Errorf("User does not have authorization required to set SuperAdmin status") return fmt.Errorf("User does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/chronograf/issues/2601 for more information.")
} }
return nil return nil

View File

@ -334,7 +334,7 @@ func TestService_NewUser(t *testing.T) {
}, },
wantStatus: http.StatusUnauthorized, wantStatus: http.StatusUnauthorized,
wantContentType: "application/json", wantContentType: "application/json",
wantBody: `{"code":401,"message":"User does not have authorization required to set SuperAdmin status"}`, wantBody: `{"code":401,"message":"User does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/chronograf/issues/2601 for more information."}`,
}, },
{ {
name: "Create a new SuperAdmin User - as superadmin", name: "Create a new SuperAdmin User - as superadmin",
@ -900,7 +900,7 @@ func TestService_UpdateUser(t *testing.T) {
id: "1336", id: "1336",
wantStatus: http.StatusUnauthorized, wantStatus: http.StatusUnauthorized,
wantContentType: "application/json", wantContentType: "application/json",
wantBody: `{"code":401,"message":"User does not have authorization required to set SuperAdmin status"}`, wantBody: `{"code":401,"message":"User does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/chronograf/issues/2601 for more information."}`,
}, },
{ {
name: "Update a Chronograf user to super admin - with super admin context", name: "Update a Chronograf user to super admin - with super admin context",