@@ -851,12 +851,6 @@ func registerRoutes(m *web.Router) {
851851 }
852852 }
853853
854- reqStarsEnabled := func (ctx * context.Context ) {
855- if setting .Repository .DisableStars {
856- ctx .Error (http .StatusForbidden , "stars are disabled" )
857- }
858- }
859-
860854 individualPermsChecker := func (ctx * context.Context ) {
861855 // org permissions have been checked in context.OrgAssignment(), but individual permissions haven't been checked.
862856 if ctx .ContextUser .IsIndividual () {
@@ -1609,7 +1603,7 @@ func registerRoutes(m *web.Router) {
16091603 m .Get ("/stars" , starsEnabled , repo .Stars )
16101604 m .Get ("/watchers" , repo .Watchers )
16111605 m .Get ("/search" , reqUnitCodeReader , repo .Search )
1612- m .Post ("/action/{action:star|unstar}" , reqSignIn , reqStarsEnabled , repo .Action )
1606+ m .Post ("/action/{action:star|unstar}" , reqSignIn , starsEnabled , repo .Action )
16131607 m .Post ("/action/{action:watch|unwatch}" , reqSignIn , repo .Action )
16141608 m .Post ("/action/{action:accept_transfer|reject_transfer}" , reqSignIn , repo .Action )
16151609 }, optSignIn , context .RepoAssignment )
0 commit comments