-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add Visible modes function from Organisation to Users too #16069
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
Merged
zeripath
merged 76 commits into
go-gitea:main
from
sergey-dryabzhinsky:sergeyd-user-dont-want-exhibit-selfs
Jun 26, 2021
Merged
Changes from 6 commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
487d12a
First take for hiding users from explore page
sergey-dryabzhinsky 4d194d6
Update admin user forms
sergey-dryabzhinsky 62f2bd9
Update template for new user by admin
sergey-dryabzhinsky 1258a6e
Add migration to list to process
sergey-dryabzhinsky 51520a3
Format files
sergey-dryabzhinsky 8064e02
Update swagger template
sergey-dryabzhinsky 9d5447f
Filter users via query, not in template
sergey-dryabzhinsky f0b582c
Fix user edit by admin - store new field
sergey-dryabzhinsky 266bee8
Update locale strings for user profile page
sergey-dryabzhinsky b419594
Hide user from public api user/userSearch by swagger, only there
sergey-dryabzhinsky 0194b9d
Simplify userSearch limits if hide_from_explore_page set
sergey-dryabzhinsky 1fe1a41
Check user2 too
sergey-dryabzhinsky 9e68bb7
And add new colum for select
sergey-dryabzhinsky f6fbef7
Add 2 tests for api_user_search
sergey-dryabzhinsky 71bf397
Remove useles field
sergey-dryabzhinsky 9925724
Fix test unused/undeclared vars
sergey-dryabzhinsky 6580f93
Fix request string formating
sergey-dryabzhinsky 132a727
Update swapper template
sergey-dryabzhinsky 3d74a84
Remove whitespace
sergey-dryabzhinsky 5cb908c
Typo in fixture
sergey-dryabzhinsky 39df5f3
Don't break old tests, use new user31
sergey-dryabzhinsky c38ed85
Fix unit-tests - use user31, fix fixture typo
sergey-dryabzhinsky 5c03ff1
Pass Actor to api user search
sergey-dryabzhinsky 0655b1f
Token auth is basic auth? Trace request from who
sergey-dryabzhinsky a1bae9c
Fixes for user search:
sergey-dryabzhinsky 8b0979c
Merge branch 'main' into sergeyd-user-dont-want-exhibit-selfs
sergey-dryabzhinsky e1d9935
Rename migration
sergey-dryabzhinsky 5d27211
Merge branch 'main-gitea' into sergeyd-user-dont-want-exhibit-selfs
sergey-dryabzhinsky f9ba4f7
Mention API searches in new locale strings
sergey-dryabzhinsky 6bfa28e
Add note about visibility by admins
sergey-dryabzhinsky 7066c1f
Rewrote user hiding based on Visibility field:
sergey-dryabzhinsky fdf1f8e
Fix lint errors
sergey-dryabzhinsky c80d1c8
One more step to use `Visibility` field:
sergey-dryabzhinsky c4c1e68
Fix test
sergey-dryabzhinsky 9e90a73
Use edit test - new always set default visibility
sergey-dryabzhinsky 66a0b41
One more time edit test
sergey-dryabzhinsky 231d8ba
Next try - new user, update visibility
sergey-dryabzhinsky 06bea36
One more try
sergey-dryabzhinsky aee5bd6
We can change visibility type on create - so allow it, default value …
sergey-dryabzhinsky cfe9ce0
Update fixture
sergey-dryabzhinsky efe7865
Merge branch 'main' into sergeyd-user-dont-want-exhibit-selfs
sergey-dryabzhinsky 4fd5c86
Fix api User output?
sergey-dryabzhinsky 16e24bd
Try to fix Visibility type conversion
sergey-dryabzhinsky ddc8e4c
Try to use int for visibility
sergey-dryabzhinsky 1874740
Rewrite a little, api output for User.visibility not integer
sergey-dryabzhinsky ba59339
Fix swagger
sergey-dryabzhinsky cd70c81
Fix user test
sergey-dryabzhinsky 96018c3
Update integrations/api_user_search_test.go
6543 9e051e3
Return back to string, remove zero check
sergey-dryabzhinsky e9e80ab
Convert visibility for API User
sergey-dryabzhinsky d5d20f2
Test strings now
sergey-dryabzhinsky d41fb82
Fixes for swagger
sergey-dryabzhinsky 04950ca
Merge branch 'main' into sergeyd-user-dont-want-exhibit-selfs
6543 197f6c1
Merge branch 'master' into sergeyd-user-dont-want-exhibit-selfs
6543 379444f
fix
6543 dfe8e37
binding do not support pointer at the moment
6543 53ecfb5
fix TestAPIRepoTransfer
6543 4208b60
respect setting.Service.DefaultUserVisibilityMode
6543 b677e38
fix unit test :D
6543 994e7b9
Update new ini-option description
sergey-dryabzhinsky 830eb28
Merge branch 'main-gitea' into sergeyd-user-dont-want-exhibit-selfs
sergey-dryabzhinsky 87455ff
Update other ini-option description
sergey-dryabzhinsky 06e1e73
Fix swagger template
sergey-dryabzhinsky a19c673
Merge branch 'main' into sergeyd-user-dont-want-exhibit-selfs
6543 7c95a06
Small fixes as suggested
sergey-dryabzhinsky f768063
Fix user_test - need to check with app-default value, fix selected va…
sergey-dryabzhinsky efa6ed5
Merge branch 'master' into sergeyd-user-dont-want-exhibit-selfs
6543 7fcb9be
User-Repos respect user Visible setting
6543 d04c728
Respect current User in list search
sergey-dryabzhinsky e4b39c2
hide user provile
6543 fd4f147
fix lint
6543 f24d3bc
Append simple visibility check to user GetInfo api
sergey-dryabzhinsky 89255e9
Fix visibility check for api get user info:
sergey-dryabzhinsky 79770b5
Improve the team test
zeripath 06fbdd5
Update models/repo_permission.go
zeripath f258297
Merge branch 'main' into sergeyd-user-dont-want-exhibit-selfs
zeripath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2021 The Gitea Authors. All rights reserved. | ||
// Use of this source code is governed by a MIT-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package migrations | ||
|
||
import ( | ||
"fmt" | ||
|
||
"xorm.io/xorm" | ||
) | ||
|
||
func addHideFromExplorePageUserColumn(x *xorm.Engine) error { | ||
type User struct { | ||
HideFromExplorePage bool `xorm:"NOT NULL DEFAULT false"` | ||
} | ||
if err := x.Sync2(new(User)); err != nil { | ||
return fmt.Errorf("Sync2: %v", err) | ||
} | ||
return nil | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.