mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: add security related settings
This commit is contained in:
@ -13,11 +13,9 @@ import (
|
||||
|
||||
func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorkspaceProfileRequest) (*v1pb.WorkspaceProfile, error) {
|
||||
workspaceProfile := &v1pb.WorkspaceProfile{
|
||||
Version: s.Profile.Version,
|
||||
Mode: s.Profile.Mode,
|
||||
Public: s.Profile.Public,
|
||||
PasswordAuth: s.Profile.PasswordAuth,
|
||||
InstanceUrl: s.Profile.InstanceURL,
|
||||
Version: s.Profile.Version,
|
||||
Mode: s.Profile.Mode,
|
||||
InstanceUrl: s.Profile.InstanceURL,
|
||||
}
|
||||
println("workspaceProfile: ", workspaceProfile.Mode)
|
||||
owner, err := s.GetInstanceOwner(ctx)
|
||||
@ -26,10 +24,6 @@ func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorks
|
||||
}
|
||||
if owner != nil {
|
||||
workspaceProfile.Owner = owner.Name
|
||||
} else {
|
||||
// If owner is not found, set Public/PasswordAuth to true.
|
||||
workspaceProfile.Public = true
|
||||
workspaceProfile.PasswordAuth = true
|
||||
}
|
||||
return workspaceProfile, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user