Skip to content
Snippets Groups Projects
Commit e1b72ca6 authored by Semyon Krestyaninov's avatar Semyon Krestyaninov
Browse files

refactor

parent 036549b5
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,8 @@ import (
"git.perx.ru/perxis/perxis-go/pkg/spaces"
)
const AnonymousID = "anonymous"
type Anonymous struct {
roles roles.Roles
spaces spaces.Spaces
......@@ -21,12 +23,8 @@ type Anonymous struct {
environments environments.Environments
}
func (Anonymous) GetID(ctx context.Context) string { return "anonymous" }
func (Anonymous) GlobalID(ctx context.Context) *id.ID {
return id.NewUserID("anonymous")
}
func (Anonymous) GetID(ctx context.Context) string { return AnonymousID }
func (Anonymous) GlobalID(ctx context.Context) *id.ID { return id.NewUserID(AnonymousID) }
func (Anonymous) IsValid(ctx context.Context) bool { return false }
func (Anonymous) IsSystem(ctx context.Context) bool { return false }
func (Anonymous) IsManagementAllowed(ctx context.Context, spaceID string) error {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment