Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
7c9e54af
Unverified
Commit
7c9e54af
authored
Jul 14, 2024
by
Johnny
Committed by
GitHub
Jul 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update disallow public visibility setting name (#3687)
parent
6825c1de
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
198 additions
and
334 deletions
+198
-334
apidocs.swagger.yaml
docs/apidocs.swagger.yaml
+66
-203
workspace_setting_service.proto
proto/api/v1/workspace_setting_service.proto
+2
-2
workspace_setting_service.pb.go
proto/gen/api/v1/workspace_setting_service.pb.go
+66
-66
workspace_setting.pb.go
proto/gen/store/workspace_setting.pb.go
+44
-43
workspace_setting.proto
proto/store/workspace_setting.proto
+2
-2
memo_service.go
server/router/api/v1/memo_service.go
+2
-2
workspace_setting_service.go
server/router/api/v1/workspace_setting_service.go
+12
-12
index.tsx
web/src/components/MemoEditor/index.tsx
+2
-2
MemoRelatedSettings.tsx
web/src/components/Settings/MemoRelatedSettings.tsx
+2
-2
No files found.
docs/apidocs.swagger.yaml
View file @
7c9e54af
This diff is collapsed.
Click to expand it.
proto/api/v1/workspace_setting_service.proto
View file @
7c9e54af
...
@@ -82,8 +82,8 @@ message WorkspaceStorageSetting {
...
@@ -82,8 +82,8 @@ message WorkspaceStorageSetting {
}
}
message
WorkspaceMemoRelatedSetting
{
message
WorkspaceMemoRelatedSetting
{
// disallow_public_
share disallows set memo as public visible
.
// disallow_public_
visibility disallows set memo as public visibility
.
bool
disallow_public_visib
le
=
1
;
bool
disallow_public_visib
ility
=
1
;
// display_with_update_time orders and displays memo with update time.
// display_with_update_time orders and displays memo with update time.
bool
display_with_update_time
=
2
;
bool
display_with_update_time
=
2
;
// content_length_limit is the limit of content length. Unit is byte.
// content_length_limit is the limit of content length. Unit is byte.
...
...
proto/gen/api/v1/workspace_setting_service.pb.go
View file @
7c9e54af
This diff is collapsed.
Click to expand it.
proto/gen/store/workspace_setting.pb.go
View file @
7c9e54af
...
@@ -604,8 +604,8 @@ type WorkspaceMemoRelatedSetting struct {
...
@@ -604,8 +604,8 @@ type WorkspaceMemoRelatedSetting struct {
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
unknownFields
protoimpl
.
UnknownFields
// disallow_public_
share disallows set memo as public visible
.
// disallow_public_
visibility disallows set memo as public visibility
.
DisallowPublicVisib
le
bool
`protobuf:"varint,1,opt,name=disallow_public_visible,json=disallowPublicVisible,proto3" json:"disallow_public_visible
,omitempty"`
DisallowPublicVisib
ility
bool
`protobuf:"varint,1,opt,name=disallow_public_visibility,json=disallowPublicVisibility,proto3" json:"disallow_public_visibility
,omitempty"`
// display_with_update_time orders and displays memo with update time.
// display_with_update_time orders and displays memo with update time.
DisplayWithUpdateTime
bool
`protobuf:"varint,2,opt,name=display_with_update_time,json=displayWithUpdateTime,proto3" json:"display_with_update_time,omitempty"`
DisplayWithUpdateTime
bool
`protobuf:"varint,2,opt,name=display_with_update_time,json=displayWithUpdateTime,proto3" json:"display_with_update_time,omitempty"`
// content_length_limit is the limit of content length. Unit is byte.
// content_length_limit is the limit of content length. Unit is byte.
...
@@ -650,9 +650,9 @@ func (*WorkspaceMemoRelatedSetting) Descriptor() ([]byte, []int) {
...
@@ -650,9 +650,9 @@ func (*WorkspaceMemoRelatedSetting) Descriptor() ([]byte, []int) {
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
6
}
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
6
}
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetDisallowPublicVisib
le
()
bool
{
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetDisallowPublicVisib
ility
()
bool
{
if
x
!=
nil
{
if
x
!=
nil
{
return
x
.
DisallowPublicVisib
le
return
x
.
DisallowPublicVisib
ility
}
}
return
false
return
false
}
}
...
@@ -782,46 +782,47 @@ var file_store_workspace_setting_proto_rawDesc = []byte{
...
@@ -782,46 +782,47 @@ var file_store_workspace_setting_proto_rawDesc = []byte{
0x16
,
0x0a
,
0x06
,
0x72
,
0x65
,
0x67
,
0x69
,
0x6f
,
0x6e
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x16
,
0x0a
,
0x06
,
0x72
,
0x65
,
0x67
,
0x69
,
0x6f
,
0x6e
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x72
,
0x65
,
0x67
,
0x69
,
0x6f
,
0x6e
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x62
,
0x75
,
0x63
,
0x6b
,
0x65
,
0x06
,
0x72
,
0x65
,
0x67
,
0x69
,
0x6f
,
0x6e
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x62
,
0x75
,
0x63
,
0x6b
,
0x65
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x62
,
0x75
,
0x63
,
0x6b
,
0x65
,
0x74
,
0x22
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x62
,
0x75
,
0x63
,
0x6b
,
0x65
,
0x74
,
0x22
,
0xd
9
,
0x02
,
0x0a
,
0x1b
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x4d
,
0x65
,
0x6d
,
0xd
f
,
0x02
,
0x0a
,
0x1b
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x52
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x6f
,
0x52
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x36
,
0x0a
,
0x17
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x5f
,
0x70
,
0x75
,
0x62
,
0x6c
,
0x3c
,
0x0a
,
0x1a
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x5f
,
0x70
,
0x75
,
0x62
,
0x6c
,
0x69
,
0x63
,
0x5f
,
0x76
,
0x69
,
0x73
,
0x69
,
0x62
,
0x6c
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x08
,
0x69
,
0x63
,
0x5f
,
0x76
,
0x69
,
0x73
,
0x69
,
0x62
,
0x69
,
0x6c
,
0x69
,
0x74
,
0x79
,
0x18
,
0x01
,
0x20
,
0x52
,
0x15
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x50
,
0x75
,
0x62
,
0x6c
,
0x69
,
0x63
,
0x01
,
0x28
,
0x08
,
0x52
,
0x18
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x50
,
0x75
,
0x62
,
0x56
,
0x69
,
0x73
,
0x69
,
0x62
,
0x6c
,
0x65
,
0x12
,
0x37
,
0x0a
,
0x18
,
0x64
,
0x69
,
0x73
,
0x70
,
0x6c
,
0x6c
,
0x69
,
0x63
,
0x56
,
0x69
,
0x73
,
0x69
,
0x62
,
0x69
,
0x6c
,
0x69
,
0x74
,
0x79
,
0x12
,
0x37
,
0x0a
,
0x61
,
0x79
,
0x5f
,
0x77
,
0x69
,
0x74
,
0x68
,
0x5f
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x74
,
0x18
,
0x64
,
0x69
,
0x73
,
0x70
,
0x6c
,
0x61
,
0x79
,
0x5f
,
0x77
,
0x69
,
0x74
,
0x68
,
0x5f
,
0x75
,
0x70
,
0x69
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x15
,
0x64
,
0x69
,
0x73
,
0x70
,
0x6c
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x61
,
0x79
,
0x57
,
0x69
,
0x74
,
0x68
,
0x55
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x54
,
0x69
,
0x6d
,
0x65
,
0x15
,
0x64
,
0x69
,
0x73
,
0x70
,
0x6c
,
0x61
,
0x79
,
0x57
,
0x69
,
0x74
,
0x68
,
0x55
,
0x70
,
0x64
,
0x61
,
0x12
,
0x30
,
0x0a
,
0x14
,
0x63
,
0x6f
,
0x6e
,
0x74
,
0x65
,
0x6e
,
0x74
,
0x5f
,
0x6c
,
0x65
,
0x6e
,
0x67
,
0x74
,
0x65
,
0x54
,
0x69
,
0x6d
,
0x65
,
0x12
,
0x30
,
0x0a
,
0x14
,
0x63
,
0x6f
,
0x6e
,
0x74
,
0x65
,
0x6e
,
0x74
,
0x68
,
0x5f
,
0x6c
,
0x69
,
0x6d
,
0x69
,
0x74
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x12
,
0x74
,
0x5f
,
0x6c
,
0x65
,
0x6e
,
0x67
,
0x74
,
0x68
,
0x5f
,
0x6c
,
0x69
,
0x6d
,
0x69
,
0x74
,
0x18
,
0x03
,
0x63
,
0x6f
,
0x6e
,
0x74
,
0x65
,
0x6e
,
0x74
,
0x4c
,
0x65
,
0x6e
,
0x67
,
0x74
,
0x68
,
0x4c
,
0x69
,
0x6d
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x12
,
0x63
,
0x6f
,
0x6e
,
0x74
,
0x65
,
0x6e
,
0x74
,
0x4c
,
0x65
,
0x6e
,
0x69
,
0x74
,
0x12
,
0x2e
,
0x0a
,
0x13
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x5f
,
0x61
,
0x75
,
0x74
,
0x67
,
0x74
,
0x68
,
0x4c
,
0x69
,
0x6d
,
0x69
,
0x74
,
0x12
,
0x2e
,
0x0a
,
0x13
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6f
,
0x5f
,
0x63
,
0x6f
,
0x6d
,
0x70
,
0x61
,
0x63
,
0x74
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x6c
,
0x65
,
0x5f
,
0x61
,
0x75
,
0x74
,
0x6f
,
0x5f
,
0x63
,
0x6f
,
0x6d
,
0x70
,
0x61
,
0x63
,
0x74
,
0x18
,
0x11
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x41
,
0x75
,
0x74
,
0x6f
,
0x43
,
0x6f
,
0x6d
,
0x70
,
0x61
,
0x04
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x11
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x41
,
0x75
,
0x74
,
0x63
,
0x74
,
0x12
,
0x37
,
0x0a
,
0x18
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x5f
,
0x64
,
0x6f
,
0x75
,
0x6f
,
0x43
,
0x6f
,
0x6d
,
0x70
,
0x61
,
0x63
,
0x74
,
0x12
,
0x37
,
0x0a
,
0x18
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x62
,
0x6c
,
0x65
,
0x5f
,
0x63
,
0x6c
,
0x69
,
0x63
,
0x6b
,
0x5f
,
0x65
,
0x64
,
0x69
,
0x74
,
0x18
,
0x05
,
0x6c
,
0x65
,
0x5f
,
0x64
,
0x6f
,
0x75
,
0x62
,
0x6c
,
0x65
,
0x5f
,
0x63
,
0x6c
,
0x69
,
0x63
,
0x6b
,
0x5f
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x15
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x44
,
0x6f
,
0x75
,
0x62
,
0x65
,
0x64
,
0x69
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x15
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x43
,
0x6c
,
0x69
,
0x63
,
0x6b
,
0x45
,
0x64
,
0x69
,
0x74
,
0x12
,
0x2e
,
0x0a
,
0x13
,
0x65
,
0x6c
,
0x65
,
0x44
,
0x6f
,
0x75
,
0x62
,
0x6c
,
0x65
,
0x43
,
0x6c
,
0x69
,
0x63
,
0x6b
,
0x45
,
0x64
,
0x69
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x5f
,
0x6c
,
0x69
,
0x6e
,
0x6b
,
0x5f
,
0x70
,
0x72
,
0x65
,
0x76
,
0x69
,
0x74
,
0x12
,
0x2e
,
0x0a
,
0x13
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x5f
,
0x6c
,
0x69
,
0x6e
,
0x6b
,
0x65
,
0x77
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x11
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x5f
,
0x70
,
0x72
,
0x65
,
0x76
,
0x69
,
0x65
,
0x77
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x11
,
0x4c
,
0x69
,
0x6e
,
0x6b
,
0x50
,
0x72
,
0x65
,
0x76
,
0x69
,
0x65
,
0x77
,
0x2a
,
0x73
,
0x0a
,
0x13
,
0x57
,
0x65
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x4c
,
0x69
,
0x6e
,
0x6b
,
0x50
,
0x72
,
0x65
,
0x76
,
0x69
,
0x65
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x4b
,
0x77
,
0x2a
,
0x73
,
0x0a
,
0x13
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x65
,
0x65
,
0x79
,
0x12
,
0x25
,
0x0a
,
0x21
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x50
,
0x41
,
0x43
,
0x45
,
0x5f
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x25
,
0x0a
,
0x21
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x4e
,
0x47
,
0x5f
,
0x4b
,
0x45
,
0x59
,
0x5f
,
0x55
,
0x4e
,
0x53
,
0x50
,
0x53
,
0x50
,
0x41
,
0x43
,
0x45
,
0x5f
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x4e
,
0x47
,
0x5f
,
0x4b
,
0x45
,
0x45
,
0x43
,
0x49
,
0x46
,
0x49
,
0x45
,
0x44
,
0x10
,
0x00
,
0x12
,
0x09
,
0x0a
,
0x05
,
0x42
,
0x41
,
0x53
,
0x59
,
0x5f
,
0x55
,
0x4e
,
0x53
,
0x50
,
0x45
,
0x43
,
0x49
,
0x46
,
0x49
,
0x45
,
0x44
,
0x10
,
0x00
,
0x12
,
0x49
,
0x43
,
0x10
,
0x01
,
0x12
,
0x0b
,
0x0a
,
0x07
,
0x47
,
0x45
,
0x4e
,
0x45
,
0x52
,
0x41
,
0x4c
,
0x10
,
0x09
,
0x0a
,
0x05
,
0x42
,
0x41
,
0x53
,
0x49
,
0x43
,
0x10
,
0x01
,
0x12
,
0x0b
,
0x0a
,
0x07
,
0x47
,
0x45
,
0x02
,
0x12
,
0x0b
,
0x0a
,
0x07
,
0x53
,
0x54
,
0x4f
,
0x52
,
0x41
,
0x47
,
0x45
,
0x10
,
0x03
,
0x12
,
0x10
,
0x4e
,
0x45
,
0x52
,
0x41
,
0x4c
,
0x10
,
0x02
,
0x12
,
0x0b
,
0x0a
,
0x07
,
0x53
,
0x54
,
0x4f
,
0x52
,
0x41
,
0x0a
,
0x0c
,
0x4d
,
0x45
,
0x4d
,
0x4f
,
0x5f
,
0x52
,
0x45
,
0x4c
,
0x41
,
0x54
,
0x45
,
0x44
,
0x10
,
0x04
,
0x47
,
0x45
,
0x10
,
0x03
,
0x12
,
0x10
,
0x0a
,
0x0c
,
0x4d
,
0x45
,
0x4d
,
0x4f
,
0x5f
,
0x52
,
0x45
,
0x4c
,
0x42
,
0xa0
,
0x01
,
0x0a
,
0x0f
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x41
,
0x54
,
0x45
,
0x44
,
0x10
,
0x04
,
0x42
,
0xa0
,
0x01
,
0x0a
,
0x0f
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x42
,
0x15
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x42
,
0x15
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x29
,
0x67
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x29
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x67
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x70
,
0x65
,
0x6e
,
0x2f
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xa2
,
0x02
,
0x03
,
0x4d
,
0x53
,
0x58
,
0xaa
,
0x02
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xa2
,
0x02
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xca
,
0x02
,
0x0b
,
0x4d
,
0x03
,
0x4d
,
0x53
,
0x58
,
0xaa
,
0x02
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x53
,
0x74
,
0x6f
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xe2
,
0x02
,
0x17
,
0x4d
,
0x65
,
0x6d
,
0x72
,
0x65
,
0xca
,
0x02
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x6f
,
0x73
,
0x5c
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0xe2
,
0x02
,
0x17
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x5c
,
0x47
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x53
,
0x74
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x72
,
0x65
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
}
var
(
var
(
...
...
proto/store/workspace_setting.proto
View file @
7c9e54af
...
@@ -78,8 +78,8 @@ message StorageS3Config {
...
@@ -78,8 +78,8 @@ message StorageS3Config {
}
}
message
WorkspaceMemoRelatedSetting
{
message
WorkspaceMemoRelatedSetting
{
// disallow_public_
share disallows set memo as public visible
.
// disallow_public_
visibility disallows set memo as public visibility
.
bool
disallow_public_visib
le
=
1
;
bool
disallow_public_visib
ility
=
1
;
// display_with_update_time orders and displays memo with update time.
// display_with_update_time orders and displays memo with update time.
bool
display_with_update_time
=
2
;
bool
display_with_update_time
=
2
;
// content_length_limit is the limit of content length. Unit is byte.
// content_length_limit is the limit of content length. Unit is byte.
...
...
server/router/api/v1/memo_service.go
View file @
7c9e54af
...
@@ -49,7 +49,7 @@ func (s *APIV1Service) CreateMemo(ctx context.Context, request *v1pb.CreateMemoR
...
@@ -49,7 +49,7 @@ func (s *APIV1Service) CreateMemo(ctx context.Context, request *v1pb.CreateMemoR
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
status
.
Errorf
(
codes
.
Internal
,
"failed to get workspace memo related setting"
)
return
nil
,
status
.
Errorf
(
codes
.
Internal
,
"failed to get workspace memo related setting"
)
}
}
if
workspaceMemoRelatedSetting
.
DisallowPublicVisib
le
&&
create
.
Visibility
==
store
.
Public
{
if
workspaceMemoRelatedSetting
.
DisallowPublicVisib
ility
&&
create
.
Visibility
==
store
.
Public
{
return
nil
,
status
.
Errorf
(
codes
.
PermissionDenied
,
"disable public memos system setting is enabled"
)
return
nil
,
status
.
Errorf
(
codes
.
PermissionDenied
,
"disable public memos system setting is enabled"
)
}
}
contentLengthLimit
,
err
:=
s
.
getContentLengthLimit
(
ctx
)
contentLengthLimit
,
err
:=
s
.
getContentLengthLimit
(
ctx
)
...
@@ -295,7 +295,7 @@ func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoR
...
@@ -295,7 +295,7 @@ func (s *APIV1Service) UpdateMemo(ctx context.Context, request *v1pb.UpdateMemoR
return
nil
,
status
.
Errorf
(
codes
.
Internal
,
"failed to get workspace memo related setting"
)
return
nil
,
status
.
Errorf
(
codes
.
Internal
,
"failed to get workspace memo related setting"
)
}
}
visibility
:=
convertVisibilityToStore
(
request
.
Memo
.
Visibility
)
visibility
:=
convertVisibilityToStore
(
request
.
Memo
.
Visibility
)
if
workspaceMemoRelatedSetting
.
DisallowPublicVisib
le
&&
visibility
==
store
.
Public
{
if
workspaceMemoRelatedSetting
.
DisallowPublicVisib
ility
&&
visibility
==
store
.
Public
{
return
nil
,
status
.
Errorf
(
codes
.
PermissionDenied
,
"disable public memos system setting is enabled"
)
return
nil
,
status
.
Errorf
(
codes
.
PermissionDenied
,
"disable public memos system setting is enabled"
)
}
}
update
.
Visibility
=
&
visibility
update
.
Visibility
=
&
visibility
...
...
server/router/api/v1/workspace_setting_service.go
View file @
7c9e54af
...
@@ -214,12 +214,12 @@ func convertWorkspaceMemoRelatedSettingFromStore(setting *storepb.WorkspaceMemoR
...
@@ -214,12 +214,12 @@ func convertWorkspaceMemoRelatedSettingFromStore(setting *storepb.WorkspaceMemoR
return
nil
return
nil
}
}
return
&
v1pb
.
WorkspaceMemoRelatedSetting
{
return
&
v1pb
.
WorkspaceMemoRelatedSetting
{
DisallowPublicVisib
le
:
setting
.
DisallowPublicVisible
,
DisallowPublicVisib
ility
:
setting
.
DisallowPublicVisibility
,
DisplayWithUpdateTime
:
setting
.
DisplayWithUpdateTime
,
DisplayWithUpdateTime
:
setting
.
DisplayWithUpdateTime
,
ContentLengthLimit
:
setting
.
ContentLengthLimit
,
ContentLengthLimit
:
setting
.
ContentLengthLimit
,
EnableAutoCompact
:
setting
.
EnableAutoCompact
,
EnableAutoCompact
:
setting
.
EnableAutoCompact
,
EnableDoubleClickEdit
:
setting
.
EnableDoubleClickEdit
,
EnableDoubleClickEdit
:
setting
.
EnableDoubleClickEdit
,
EnableLinkPreview
:
setting
.
EnableLinkPreview
,
EnableLinkPreview
:
setting
.
EnableLinkPreview
,
}
}
}
}
...
@@ -228,11 +228,11 @@ func convertWorkspaceMemoRelatedSettingToStore(setting *v1pb.WorkspaceMemoRelate
...
@@ -228,11 +228,11 @@ func convertWorkspaceMemoRelatedSettingToStore(setting *v1pb.WorkspaceMemoRelate
return
nil
return
nil
}
}
return
&
storepb
.
WorkspaceMemoRelatedSetting
{
return
&
storepb
.
WorkspaceMemoRelatedSetting
{
DisallowPublicVisib
le
:
setting
.
DisallowPublicVisible
,
DisallowPublicVisib
ility
:
setting
.
DisallowPublicVisibility
,
DisplayWithUpdateTime
:
setting
.
DisplayWithUpdateTime
,
DisplayWithUpdateTime
:
setting
.
DisplayWithUpdateTime
,
ContentLengthLimit
:
setting
.
ContentLengthLimit
,
ContentLengthLimit
:
setting
.
ContentLengthLimit
,
EnableAutoCompact
:
setting
.
EnableAutoCompact
,
EnableAutoCompact
:
setting
.
EnableAutoCompact
,
EnableDoubleClickEdit
:
setting
.
EnableDoubleClickEdit
,
EnableDoubleClickEdit
:
setting
.
EnableDoubleClickEdit
,
EnableLinkPreview
:
setting
.
EnableLinkPreview
,
EnableLinkPreview
:
setting
.
EnableLinkPreview
,
}
}
}
}
web/src/components/MemoEditor/index.tsx
View file @
7c9e54af
...
@@ -92,14 +92,14 @@ const MemoEditor = (props: Props) => {
...
@@ -92,14 +92,14 @@ const MemoEditor = (props: Props) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
let
visibility
=
userSetting
.
memoVisibility
;
let
visibility
=
userSetting
.
memoVisibility
;
if
(
workspaceMemoRelatedSetting
.
disallowPublicVisib
le
&&
visibility
===
"PUBLIC"
)
{
if
(
workspaceMemoRelatedSetting
.
disallowPublicVisib
ility
&&
visibility
===
"PUBLIC"
)
{
visibility
=
"PRIVATE"
;
visibility
=
"PRIVATE"
;
}
}
setState
((
prevState
)
=>
({
setState
((
prevState
)
=>
({
...
prevState
,
...
prevState
,
memoVisibility
:
convertVisibilityFromString
(
visibility
),
memoVisibility
:
convertVisibilityFromString
(
visibility
),
}));
}));
},
[
userSetting
.
memoVisibility
,
workspaceMemoRelatedSetting
.
disallowPublicVisib
le
]);
},
[
userSetting
.
memoVisibility
,
workspaceMemoRelatedSetting
.
disallowPublicVisib
ility
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
memoName
)
{
if
(
memoName
)
{
...
...
web/src/components/Settings/MemoRelatedSettings.tsx
View file @
7c9e54af
...
@@ -35,8 +35,8 @@ const MemoRelatedSettings = () => {
...
@@ -35,8 +35,8 @@ const MemoRelatedSettings = () => {
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
>
{
t
(
"setting.system-section.disable-public-memos"
)
}
</
span
>
<
span
>
{
t
(
"setting.system-section.disable-public-memos"
)
}
</
span
>
<
Switch
<
Switch
checked=
{
memoRelatedSetting
.
disallowPublicVisib
le
}
checked=
{
memoRelatedSetting
.
disallowPublicVisib
ility
}
onChange=
{
(
event
)
=>
updatePartialSetting
({
disallowPublicVisib
le
:
event
.
target
.
checked
})
}
onChange=
{
(
event
)
=>
updatePartialSetting
({
disallowPublicVisib
ility
:
event
.
target
.
checked
})
}
/>
/>
</
div
>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment