do not expose visible attribute of robot account to user

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-10-14 14:11:06 +08:00
parent 3e81bd7f1d
commit c597e46756

View File

@ -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"`
}