forgejo/models/repo
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
..
archiver.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
attachment.go [FEAT] allow setting the update date on issues and comments 2024-01-08 14:01:18 +01:00
attachment_test.go
avatar.go
collaboration.go
collaboration_test.go
fork.go
fork_test.go
git.go
issue.go
language_stats.go
main_test.go
mirror.go
pushmirror.go [GITEA] new doctor check: fix-push-mirrors-without-git-remote (#1853) 2024-01-08 17:05:47 +01:00
pushmirror_test.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
redirect.go
redirect_test.go
release.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
release_test.go
repo.go
repo_indexer.go
repo_list.go
repo_list_test.go [GITEA] Improve HTML title on repositories 2024-01-08 16:52:44 +01:00
repo_test.go
repo_unit.go [GITEA] Optionally allow anyone to edit Wikis 2024-01-08 17:05:48 +01:00
repo_unit_test.go [GITEA] Optionally allow anyone to edit Wikis 2024-01-08 17:05:48 +01:00
search.go
star.go
star_test.go
topic.go Add orphaned topic consistency check (#28507) 2023-12-18 15:32:08 +00:00
topic_test.go
update.go
upload.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
user_repo.go
user_repo_test.go
watch.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
watch_test.go
wiki.go
wiki_test.go