forgejo/models/repo
Gergely Nagy f09f6e029b
[FEAT] Repository flags
This implements "repository flags", a way for instance administrators to
assign custom flags to repositories. The idea is that custom templates
can look at these flags, and display banners based on them, Forgejo does
not provide anything built on top of it, just the foundation. The
feature is optional, and disabled by default. To enable it, set
`[repository].ENABLE_FLAGS = true`.

On the UI side, instance administrators will see a new "Manage flags"
tab on repositories, and a list of enabled tags (if any) on the
repository home page. The "Manage flags" page allows them to remove
existing flags, or add any new ones that are listed in
`[repository].SETTABLE_FLAGS`.

The model does not enforce that only the `SETTABLE_FLAGS` are present.
If the setting is changed, old flags may remain present in the database,
and anything that uses them, will still work. The repository flag
management page will allow an instance administrator to remove them, but
not set them, once removed.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit ba735ce222)
2024-01-15 16:51:45 +00:00
..
archiver.go Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
attachment.go [FEAT] allow setting the update date on issues and comments 2024-01-15 14:48:04 +00:00
attachment_test.go
avatar.go
collaboration.go Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
collaboration_test.go Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
fork.go Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
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-15 16:11:59 +00:00
pushmirror_test.go Refactor deletion (#28610) 2023-12-25 21:25:29 +01:00
redirect.go
redirect_test.go
release.go Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
release_test.go
repo.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
repo_flags.go [FEAT] Repository flags 2024-01-15 16:51:45 +00:00
repo_flags_test.go [FEAT] Repository flags 2024-01-15 16:51:45 +00:00
repo_indexer.go
repo_list.go Restricted users only see repos in orgs which their team was assigned to (#28025) 2023-11-14 15:23:04 +01:00
repo_list_test.go [GITEA] Improve HTML title on repositories 2024-01-15 16:11:57 +00:00
repo_test.go Refactor SSH clone URL generation code (#28421) 2023-12-15 06:18:12 +00:00
repo_unit.go [GITEA] Optionally allow anyone to edit Wikis 2024-01-15 16:48:44 +00:00
repo_unit_test.go [GITEA] Optionally allow anyone to edit Wikis 2024-01-15 16:48:44 +00: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 Replace more db.DefaultContext (#27628) 2023-10-15 17:46:06 +02:00
wiki.go
wiki_test.go