add configuration option to restrict users by default (#16256)
* add configuration option to restrict users by default * default IsRestricted permission only set on sign up setting this in the model messes with other workflows (e.g. syncing LDAP users) where the IsRestricted permission needs to be explicitly set and not overridden by a config value * fix formatting * Apply suggestions from code review * ensure newly created user is set to restricted * ensure imports are in the correct order Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
251d7f524a
commit
908136c557
5 changed files with 34 additions and 4 deletions
|
@ -652,6 +652,9 @@ PATH =
|
|||
;; Default value for AllowCreateOrganization
|
||||
;; Every new user will have rights set to create organizations depending on this setting
|
||||
;DEFAULT_ALLOW_CREATE_ORGANIZATION = true
|
||||
;; Default value for IsRestricted
|
||||
;; Every new user will have restricted permissions depending on this setting
|
||||
;DEFAULT_USER_IS_RESTRICTED = false
|
||||
;;
|
||||
;; Either "public", "limited" or "private", default is "public"
|
||||
;; Limited is for users visible only to signed users
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue