-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Allow everyone to read or write a wiki by a repo unit setting #30495
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
Merged
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
9a58412
fix
wxiaoguang 8ba2d63
fix test
wxiaoguang 69396b5
always check map length instead of nil
wxiaoguang 6664f3c
more tests
wxiaoguang 5a4b286
u.EveryoneAccessMode >= perm_model.AccessModeRead
wxiaoguang 34650ad
fix permission check
wxiaoguang 96d435c
no need to introduce "unset"
wxiaoguang cbd2e24
fix permission check in convert function
wxiaoguang 756bb79
fine tune
wxiaoguang e8dda7e
fix model default
wxiaoguang 903c8c9
fix test
wxiaoguang 4aab4ee
Update options/locale/locale_en-US.ini
wxiaoguang 7f9b95e
address reviews
wxiaoguang e7548e5
refactor unit mode
wxiaoguang d662a0c
Merge branch 'main' into allow-everyone-wiki
wxiaoguang e95faa5
fix merge
wxiaoguang 2016049
Update templates/repo/settings/options.tmpl
wxiaoguang 2a26cee
hide the struct internal fields
wxiaoguang 90dcf3c
fix repo setting ui
wxiaoguang 06ce401
fix repo setting ui
wxiaoguang cbbd321
more tests
wxiaoguang 0f4dfe3
use better text for "not set" permission
wxiaoguang 16ebe02
Merge branch 'main' into allow-everyone-wiki
GiteaBot fb21973
only apply everyone access mode if there is no error
wxiaoguang 1b85718
Merge branch 'main' into allow-everyone-wiki
GiteaBot 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
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,17 @@ | ||
// Copyright 2024 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package v1_23 //nolint | ||
|
||
import ( | ||
"code.gitea.io/gitea/models/perm" | ||
|
||
"xorm.io/xorm" | ||
) | ||
|
||
func AddRepoUnitEveryoneAccessMode(x *xorm.Engine) error { | ||
type RepoUnit struct { //revive:disable-line:exported | ||
EveryoneAccessMode perm.AccessMode `xorm:"NOT NULL DEFAULT 0"` | ||
} | ||
return x.Sync(&RepoUnit{}) | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
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.