-
-
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The descriptions are good(if I've read the code correctly) and describes what the fields are, I think the wording need a little bit of change and maybe clarify some things up.
models/user.go
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
// true: user is not allowed to log in Web UI. Git SSH access could still be allowed. | |
// true: user is not allowed to log into the Web UI. Git SSH access could still be allowed. |
I think Git SSH access >could< still be allowed.
that could
could be clarified, as in, which conditions the Git SSH access is allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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 comment
The 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 comment
The 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".
Co-authored-by: Gusted <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prohibtedLogin
could be done in another PR as this is just for the user struct. LGTM
Copied from and close #17467
Please help to check whether my understanding and comments are correct.