forgejo/models
Gergely Nagy 42c55e494e
[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)
2024-01-22 18:13:41 +00:00
..
actions [GITEA] allow viewing the latest Action Run on the web 2024-01-22 18:13:41 +00:00
activities Speed up loading the dashboard on mysql/mariadb (#28546) 2024-01-14 15:34:25 +01:00
admin
asymkey [GITEA] Add noreply email address as verified for SSH signed Git commits 2024-01-22 18:13:40 +00:00
auth [GITEA] Fix session generation for database 2024-01-22 18:13:41 +00:00
avatars Refactor some legacy code and remove unused code (#28622) 2023-12-28 09:38:59 +00:00
db [GITEA] Add slow SQL query warning 2024-01-22 18:13:40 +00:00
dbfs
fixtures [GITEA] Add noreply email address as verified for SSH signed Git commits 2024-01-22 18:13:40 +00:00
forgejo/semver [SEMVER] store SemVer in ForgejoSemVer after a database upgrade 2024-01-22 13:41:21 +00:00
forgejo_migrations [GITEA] Optionally allow anyone to edit Wikis 2024-01-22 18:13:41 +00:00
git Add support for sha256 repositories (#23894) 2024-01-19 17:05:02 +01:00
issues [FEAT] allow setting the update date on issues and comments 2024-01-22 13:41:21 +00:00
migrations [GITEA] new doctor check: fix-push-mirrors-without-git-remote (#1853) 2024-01-22 18:13:41 +00:00
organization
packages Fix some RPM registry flaws (#28782) 2024-01-19 11:37:10 +00:00
perm [GITEA] Optionally allow anyone to edit Wikis 2024-01-22 18:13:41 +00:00
project
pull [GITEA] GetScheduledMergeByPullID may involve a system user 2024-01-22 18:13:41 +00:00
repo [GITEA] Optionally allow anyone to edit Wikis 2024-01-22 18:13:41 +00:00
secret
shared/types
system Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
unit
unittest [GITEA] Enable mocked HTTP responses for GitLab migration test 2024-01-22 18:13:41 +00:00
user [GITEA] Allow changing the email address before activation 2024-01-22 18:13:41 +00:00
webhook Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
error.go Forbid removing the last admin user (#28337) 2024-01-15 06:51:43 +00:00
fixture_generation.go
fixture_test.go
main_test.go
org.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
org_team.go
org_team_test.go
org_test.go
repo.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
repo_test.go
repo_transfer.go
repo_transfer_test.go