The Wayback Machine - https://web.archive.org/web/20220212193704/https://github.com/go-gitea/gitea/pull/16256
Skip to content
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

add configuration option to restrict users by default #16256

Merged

Conversation

@rjnienaber
Copy link
Contributor

@rjnienaber rjnienaber commented Jun 26, 2021

Resolves #427.

Adds a configuration option to app.ini that makes new users have the IsRestricted permission set to true by default.

@6543 6543 added this to the 1.16.0 milestone Jun 26, 2021
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
@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Jun 26, 2021

Codecov Report

Merging #16256 (607ccd4) into main (0393a57) will increase coverage by 1.25%.
The diff coverage is 53.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16256      +/-   ##
==========================================
+ Coverage   44.24%   45.49%   +1.25%     
==========================================
  Files         695      709      +14     
  Lines       82341    83743    +1402     
==========================================
+ Hits        36429    38099    +1670     
+ Misses      40014    39510     -504     
- Partials     5898     6134     +236     
Impacted Files Coverage Δ
cmd/convert.go 0.00% <0.00%> (ø)
cmd/dump_repo.go 0.00% <0.00%> (ø)
cmd/generate.go 0.00% <0.00%> (ø)
cmd/hook.go 0.00% <0.00%> (ø)
cmd/migrate.go 0.00% <0.00%> (ø)
cmd/migrate_storage.go 0.00% <0.00%> (ø)
cmd/serv.go 2.36% <0.00%> (-0.22%) ⬇️
cmd/web.go 0.00% <0.00%> (ø)
models/action.go 47.12% <ø> (ø)
models/convert.go 0.00% <0.00%> (ø)
... and 260 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27c1578...607ccd4. Read the comment docs.

integrations/sqlite.ini.tmpl Outdated Show resolved Hide resolved
adelowo
adelowo approved these changes Jul 5, 2021
custom/conf/app.example.ini Outdated Show resolved Hide resolved
integrations/mssql.ini.tmpl Outdated Show resolved Hide resolved
integrations/mysql.ini.tmpl Outdated Show resolved Hide resolved
integrations/mysql8.ini.tmpl Outdated Show resolved Hide resolved
integrations/pgsql.ini.tmpl Outdated Show resolved Hide resolved
integrations/sqlite.ini.tmpl Outdated Show resolved Hide resolved
integrations/signup_test.go Outdated Show resolved Hide resolved
6543
6543 approved these changes Jul 6, 2021
@techknowlogick
Copy link
Member

@techknowlogick techknowlogick commented Jul 15, 2021

🚀

@techknowlogick techknowlogick merged commit 908136c into go-gitea:main Jul 15, 2021
2 checks passed
AbdulrhmnGhanem added a commit to kitspace/gitea that referenced this issue Aug 10, 2021
* 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 <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked issues

Successfully merging this pull request may close these issues.

6 participants