mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-21 02:30:14 +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:
+1
-1
@@ -216,7 +216,7 @@ type Service struct {
|
||||
Cover uint8 `json:"cover"`
|
||||
|
||||
EnableTriggerTask bool `gorm:"default: false" json:"enable_trigger_task,omitempty"`
|
||||
EnableShowInService bool `gorm:"default: false" json:"enable_show_in_service,omitempty"`
|
||||
HideForGuest bool `json:"hide_for_guest,omitempty"` // 对游客隐藏
|
||||
FailTriggerTasksRaw string `gorm:"default:'[]'" json:"-"`
|
||||
RecoverTriggerTasksRaw string `gorm:"default:'[]'" json:"-"`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user