-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Update User
model comments about permissions
#17583
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 2 commits
0786439
a8b777a
b542016
b116d0f
054b350
bb881a3
a29a734
9eb92dd
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 | ||||
---|---|---|---|---|---|---|
|
@@ -131,14 +131,21 @@ type User struct { | |||||
// Maximum repository creation limit, -1 means use global default | ||||||
MaxRepoCreation int `xorm:"NOT NULL DEFAULT -1"` | ||||||
|
||||||
// Permissions | ||||||
IsActive bool `xorm:"INDEX"` // Activate primary email | ||||||
IsAdmin bool | ||||||
IsRestricted bool `xorm:"NOT NULL DEFAULT false"` | ||||||
// IsActive true: primary email is activated, user can access Web UI and Git SSH. | ||||||
// false: an inactive user can only log in Web UI for account operations (ex: activate the account by email), no other access. | ||||||
wxiaoguang marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
IsActive bool `xorm:"INDEX"` | ||||||
// user is a Gitea admin, can access all repositories and admin pages | ||||||
wxiaoguang marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
IsAdmin bool | ||||||
// true: user is allowed to see only organizations/repositories that he has explicit rights specified | ||||||
wxiaoguang marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
// (ex: in private Gitea instances user won't be allowed to see even organizations/repositories that are set as public) | ||||||
IsRestricted bool `xorm:"NOT NULL DEFAULT false"` | ||||||
|
||||||
AllowGitHook bool | ||||||
AllowImportLocal bool // Allow migrate repository by local path | ||||||
AllowCreateOrganization bool `xorm:"DEFAULT true"` | ||||||
ProhibitLogin bool `xorm:"NOT NULL DEFAULT false"` | ||||||
|
||||||
// true: user is not allowed to log in Web UI. Git SSH access could still be allowed. | ||||||
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.
Suggested change
I think 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. The conditions belong to SSH access module, User model has nothing to do (no knowledge) about it. If we need to clarify the conditions, related comments should be written in SSH access module. 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. I dont have a problem if its clarified to the SSH access module. For someone who's trying understand what a field does and it refers to something that isnt described somewhere, then I would personally still not fully understand what the field does. 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. Got it. I just added a new comment: "please refer to Git/SSH access related code/documents". |
||||||
ProhibitLogin bool `xorm:"NOT NULL DEFAULT false"` | ||||||
|
||||||
// Avatar | ||||||
Avatar string `xorm:"VARCHAR(2048) NOT NULL"` | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.