feat: add security related settings

This commit is contained in:
Steven
2024-08-28 23:46:06 +08:00
parent 4e5810e205
commit 1167df29d8
16 changed files with 377 additions and 359 deletions

View File

@ -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
}