mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 09:40:12 +00:00
feat(service): replace EnableShowInService with HideForGuest
Mirror the server HideForGuest flag on services: rename the field (dropping the gorm default), invert userCanViewService so a service is visible to guests by default and hidden only when HideForGuest is set, and flip the public-stats filter in servicesentinel accordingly. Update the visibility and permission-matrix tests to the new semantics.
This commit is contained in:
@@ -489,7 +489,7 @@ func createService(c *gin.Context) (uint64, error) {
|
||||
m.LatencyNotify = mf.LatencyNotify
|
||||
m.MinLatency = mf.MinLatency
|
||||
m.MaxLatency = mf.MaxLatency
|
||||
m.EnableShowInService = mf.EnableShowInService
|
||||
m.HideForGuest = mf.HideForGuest
|
||||
m.EnableTriggerTask = mf.EnableTriggerTask
|
||||
m.RecoverTriggerTasks = mf.RecoverTriggerTasks
|
||||
m.FailTriggerTasks = mf.FailTriggerTasks
|
||||
@@ -558,7 +558,7 @@ func updateService(c *gin.Context) (any, error) {
|
||||
m.LatencyNotify = mf.LatencyNotify
|
||||
m.MinLatency = mf.MinLatency
|
||||
m.MaxLatency = mf.MaxLatency
|
||||
m.EnableShowInService = mf.EnableShowInService
|
||||
m.HideForGuest = mf.HideForGuest
|
||||
m.EnableTriggerTask = mf.EnableTriggerTask
|
||||
m.RecoverTriggerTasks = mf.RecoverTriggerTasks
|
||||
m.FailTriggerTasks = mf.FailTriggerTasks
|
||||
|
||||
Reference in New Issue
Block a user