1
0
Fork 0
forgejo/models
Gergely Nagy b6786fdb32
[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)
2024-01-08 17:05:48 +01:00
..
actions
activities
admin
asymkey
auth [GITEA] Fix session generation for database 2024-01-08 17:05:48 +01:00
avatars
db
dbfs
fixtures
forgejo/semver
forgejo_migrations [GITEA] Optionally allow anyone to edit Wikis 2024-01-08 17:05:48 +01:00
git
issues
migrations
organization
packages
perm [GITEA] Optionally allow anyone to edit Wikis 2024-01-08 17:05:48 +01:00
project
pull [GITEA] GetScheduledMergeByPullID may involve a system user 2024-01-08 17:05:47 +01:00
repo [GITEA] Optionally allow anyone to edit Wikis 2024-01-08 17:05:48 +01:00
secret
shared/types
system
unit
unittest
user [GITEA] Allow changing the email address before activation 2024-01-08 17:05:47 +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
repo_transfer_test.go