Disable Stars config option (#14653)
* Add config option to disable stars * Replace "stars" with watched in user profile * Add documentation
This commit is contained in:
parent
af2adb4e35
commit
f44543a1bb
16 changed files with 83 additions and 27 deletions
|
@ -704,6 +704,7 @@ func Contexter() func(next http.Handler) http.Handler {
|
|||
ctx.Data["EnableSwagger"] = setting.API.EnableSwagger
|
||||
ctx.Data["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn
|
||||
ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations
|
||||
ctx.Data["DisableStars"] = setting.Repository.DisableStars
|
||||
|
||||
ctx.Data["ManifestData"] = setting.ManifestData
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ var (
|
|||
PrefixArchiveFiles bool
|
||||
DisableMirrors bool
|
||||
DisableMigrations bool
|
||||
DisableStars bool `ini:"DISABLE_STARS"`
|
||||
DefaultBranch string
|
||||
AllowAdoptionOfUnadoptedRepositories bool
|
||||
AllowDeleteOfUnadoptedRepositories bool
|
||||
|
@ -154,6 +155,7 @@ var (
|
|||
PrefixArchiveFiles: true,
|
||||
DisableMirrors: false,
|
||||
DisableMigrations: false,
|
||||
DisableStars: false,
|
||||
DefaultBranch: "master",
|
||||
|
||||
// Repository editor settings
|
||||
|
|
|
@ -9,6 +9,7 @@ type GeneralRepoSettings struct {
|
|||
MirrorsDisabled bool `json:"mirrors_disabled"`
|
||||
HTTPGitDisabled bool `json:"http_git_disabled"`
|
||||
MigrationsDisabled bool `json:"migrations_disabled"`
|
||||
StarsDisabled bool `json:"stars_disabled"`
|
||||
TimeTrackingDisabled bool `json:"time_tracking_disabled"`
|
||||
LFSDisabled bool `json:"lfs_disabled"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue