From 7ae10cb7f1a520d46c2c92d60cf5181c3d7b6850 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Thu, 9 Feb 2023 15:40:34 +0900 Subject: [PATCH] change org_type.go to visible_type.go and fix the notes (#22752) It seems `VisibleType` is only designed for org at first. But it is also used by user's visibility now. So I think `org_type.go` can be changed to `visible_type.go`. --- modules/structs/{org_type.go => visible_type.go} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename modules/structs/{org_type.go => visible_type.go} (87%) diff --git a/modules/structs/org_type.go b/modules/structs/visible_type.go similarity index 87% rename from modules/structs/org_type.go rename to modules/structs/visible_type.go index 69f323fa9..b5ff353b8 100644 --- a/modules/structs/org_type.go +++ b/modules/structs/visible_type.go @@ -3,7 +3,7 @@ package structs -// VisibleType defines the visibility (Organization only) +// VisibleType defines the visibility of user and org type VisibleType int const ( @@ -13,11 +13,11 @@ const ( // VisibleTypeLimited Visible for every connected user VisibleTypeLimited - // VisibleTypePrivate Visible only for organization's members + // VisibleTypePrivate Visible only for self or admin user VisibleTypePrivate ) -// VisibilityModes is a map of org Visibility types +// VisibilityModes is a map of Visibility types var VisibilityModes = map[string]VisibleType{ "public": VisibleTypePublic, "limited": VisibleTypeLimited,