1
0
Fork 0
forgejo/models
Gergely Nagy 5eeccecafc
[GITEA] Optionally allow anyone to edit Wikis
This is largely based on gitea#6312 by @ashimokawa, with updates and
fixes by myself, and incorporates the review feedback given in that pull
request, and more.

What this patch does is add a new "default_permissions" column to the
`repo_units` table (defaulting to read permission), adjusts the
permission checking code to take this into consideration, and then
exposes a setting that lets a repo administrator enable any user on a
Forgejo instance to edit the repo's wiki (effectively giving the wiki
unit of the repo "write" permissions by default).

By default, wikis will remain restricted to collaborators, but with the
new setting exposed, they can be turned into globally editable wikis.

Fixes Codeberg/Community#28.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit 4b74439922)
(cherry picked from commit 337cf62c10)
(cherry picked from commit b6786fdb32)
(cherry picked from commit a5d2829a10)

[GITEA] Optionally allow anyone to edit Wikis (squash) AddTokenAuth

(cherry picked from commit fed50cf72e)
(cherry picked from commit 42c55e494e)
(cherry picked from commit e3463bda47)
2024-02-05 16:09:42 +01:00
..
actions [GITEA] allow viewing the latest Action Run on the web 2024-02-05 16:09:41 +01:00
activities
admin
asymkey [GITEA] Add noreply email address as verified for SSH signed Git commits 2024-02-05 16:09:40 +01:00
auth [GITEA] Fix session generation for database 2024-02-05 16:09:41 +01:00
avatars
db [GITEA] Add slow SQL query warning 2024-02-05 16:05:50 +01:00
dbfs
fixtures [GITEA] Add noreply email address as verified for SSH signed Git commits 2024-02-05 16:09:40 +01:00
forgejo/semver
forgejo_migrations [GITEA] Optionally allow anyone to edit Wikis 2024-02-05 16:09:42 +01:00
git
issues [FEAT] allow setting the update date on issues and comments 2024-02-05 14:44:33 +01:00
migrations [GITEA] new doctor check: fix-push-mirrors-without-git-remote (#1853) 2024-02-05 16:09:41 +01:00
organization
packages
perm [GITEA] Optionally allow anyone to edit Wikis 2024-02-05 16:09:42 +01:00
project
pull [GITEA] GetScheduledMergeByPullID may involve a system user 2024-02-05 16:09:41 +01:00
repo [GITEA] Optionally allow anyone to edit Wikis 2024-02-05 16:09:42 +01:00
secret
shared/types
system
unit
unittest [GITEA] Enable mocked HTTP responses for GitLab migration test 2024-02-05 16:09:41 +01:00
user [GITEA] Allow changing the email address before activation 2024-02-05 16:09:41 +01:00
webhook
error.go
fixture_generation.go
fixture_test.go
main_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go
repo_test.go
repo_transfer.go