APIs: Fix pre-processing of getApiResources & update godoc for teams endpoints (#113536)
This commit is contained in:
@@ -73,11 +73,17 @@ func (r Role) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// swagger:ignore
|
||||
type RoleDTO struct {
|
||||
Version int64 `json:"version"`
|
||||
UID string `xorm:"uid" json:"uid"`
|
||||
Name string `json:"name"`
|
||||
DisplayName string `json:"displayName,omitempty"`
|
||||
Description string `json:"description"`
|
||||
// required:true
|
||||
Version int64 `json:"version"`
|
||||
// required:true
|
||||
UID string `xorm:"uid" json:"uid"`
|
||||
// required:true
|
||||
Name string `json:"name"`
|
||||
// required:true
|
||||
DisplayName string `json:"displayName,omitempty"`
|
||||
// required:true
|
||||
Description string `json:"description"`
|
||||
// required:true
|
||||
Group string `xorm:"group_name" json:"group"`
|
||||
Permissions []Permission `json:"permissions,omitempty"`
|
||||
Delegatable *bool `json:"delegatable,omitempty"`
|
||||
@@ -87,7 +93,9 @@ type RoleDTO struct {
|
||||
ID int64 `json:"-" xorm:"pk autoincr 'id'"`
|
||||
OrgID int64 `json:"-" xorm:"org_id"`
|
||||
|
||||
// required:true
|
||||
Updated time.Time `json:"updated"`
|
||||
// required:true
|
||||
Created time.Time `json:"created"`
|
||||
}
|
||||
|
||||
@@ -193,7 +201,7 @@ type BuiltinRole struct {
|
||||
Created time.Time
|
||||
}
|
||||
|
||||
// Permission is the model for access control permissions.
|
||||
// Permission is the model for access control permissions
|
||||
type Permission struct {
|
||||
ID int64 `json:"-" xorm:"pk autoincr 'id'"`
|
||||
RoleID int64 `json:"-" xorm:"role_id"`
|
||||
|
||||
Reference in New Issue
Block a user