forked from NYANDEV/forgejo
[API] Add Restricted Field to User (#14630)
* Expose Restricted field for User * Add Option to Change Restricted on User via adminEditUser API * Add test who change restricted & test if it changed it ... * make generate-swagger Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
ce0346448f
commit
8d5c795cc4
6 changed files with 36 additions and 6 deletions
|
@ -30,6 +30,8 @@ type User struct {
|
|||
LastLogin time.Time `json:"last_login,omitempty"`
|
||||
// swagger:strfmt date-time
|
||||
Created time.Time `json:"created,omitempty"`
|
||||
// Is user restricted
|
||||
Restricted bool `json:"restricted"`
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue