From c597e467561d9c6e68abc9d6c63809886a333142 Mon Sep 17 00:00:00 2001 From: wang yan Date: Mon, 14 Oct 2019 14:11:06 +0800 Subject: [PATCH] do not expose visible attribute of robot account to user Signed-off-by: wang yan --- src/pkg/robot/model/robot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pkg/robot/model/robot.go b/src/pkg/robot/model/robot.go index 5fa65ecfd..db911f11c 100644 --- a/src/pkg/robot/model/robot.go +++ b/src/pkg/robot/model/robot.go @@ -24,7 +24,7 @@ type Robot struct { ProjectID int64 `orm:"column(project_id)" json:"project_id"` ExpiresAt int64 `orm:"column(expiresat)" json:"expires_at"` Disabled bool `orm:"column(disabled)" json:"disabled"` - Visible bool `orm:"column(visible)" json:"visible"` + Visible bool `orm:"column(visible)" json:"-"` CreationTime time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time"` UpdateTime time.Time `orm:"column(update_time);auto_now" json:"update_time"` } @@ -49,7 +49,7 @@ type RobotCreate struct { ProjectID int64 `json:"pid"` Description string `json:"description"` Disabled bool `json:"disabled"` - Visible bool `json:"visible"` + Visible bool `json:"-"` Access []*rbac.Policy `json:"access"` }