-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add Active and ProhibitLogin to API #15689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
97e948b
48255d8
c9db85e
60dab4d
fdd56e7
477758d
094d268
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -33,6 +33,10 @@ type User struct { | |||||||||||||
Created time.Time `json:"created,omitempty"` | ||||||||||||||
// Is user restricted | ||||||||||||||
Restricted bool `json:"restricted"` | ||||||||||||||
// Is user active | ||||||||||||||
IsActive *bool `json:"active,omitempty"` | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why ref? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry! I take my words back. For non-admin users, hide the field is better. A nil bool means There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case all of these fields should be omitted: Lines 56 to 61 in 8f0539c
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well if it is always false it does not leak any info ... onto normal users |
||||||||||||||
// Is user login prohibited | ||||||||||||||
ProhibitLogin *bool `json:"prohibit_login,omitempty"` | ||||||||||||||
} | ||||||||||||||
|
||||||||||||||
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility | ||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.