✨ Supply access policy in grpc get realms
This commit is contained in:
parent
4b4eb3e581
commit
7a9e31fd86
@ -4,6 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"git.solsynth.dev/hydrogen/dealer/pkg/hyper"
|
||||||
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
|
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
|
||||||
"git.solsynth.dev/hydrogen/passport/pkg/internal/database"
|
"git.solsynth.dev/hydrogen/passport/pkg/internal/database"
|
||||||
"git.solsynth.dev/hydrogen/passport/pkg/internal/models"
|
"git.solsynth.dev/hydrogen/passport/pkg/internal/models"
|
||||||
@ -26,6 +27,7 @@ func (v *Server) ListCommunityRealm(ctx context.Context, empty *proto.ListRealmR
|
|||||||
Description: item.Description,
|
Description: item.Description,
|
||||||
IsPublic: item.IsPublic,
|
IsPublic: item.IsPublic,
|
||||||
IsCommunity: item.IsCommunity,
|
IsCommunity: item.IsCommunity,
|
||||||
|
AccessPolicy: hyper.EncodeAccessPolicy(item.AccessPolicy),
|
||||||
}
|
}
|
||||||
if item.Avatar != nil {
|
if item.Avatar != nil {
|
||||||
info.Avatar = *item.Avatar
|
info.Avatar = *item.Avatar
|
||||||
@ -57,6 +59,7 @@ func (v *Server) ListAvailableRealm(ctx context.Context, request *proto.LookupUs
|
|||||||
Description: item.Description,
|
Description: item.Description,
|
||||||
IsPublic: item.IsPublic,
|
IsPublic: item.IsPublic,
|
||||||
IsCommunity: item.IsCommunity,
|
IsCommunity: item.IsCommunity,
|
||||||
|
AccessPolicy: hyper.EncodeAccessPolicy(item.AccessPolicy),
|
||||||
}
|
}
|
||||||
if item.Avatar != nil {
|
if item.Avatar != nil {
|
||||||
info.Avatar = *item.Avatar
|
info.Avatar = *item.Avatar
|
||||||
@ -88,6 +91,7 @@ func (v *Server) ListOwnedRealm(ctx context.Context, request *proto.LookupUserRe
|
|||||||
Description: item.Description,
|
Description: item.Description,
|
||||||
IsPublic: item.IsPublic,
|
IsPublic: item.IsPublic,
|
||||||
IsCommunity: item.IsCommunity,
|
IsCommunity: item.IsCommunity,
|
||||||
|
AccessPolicy: hyper.EncodeAccessPolicy(item.AccessPolicy),
|
||||||
}
|
}
|
||||||
if item.Avatar != nil {
|
if item.Avatar != nil {
|
||||||
info.Avatar = *item.Avatar
|
info.Avatar = *item.Avatar
|
||||||
@ -128,6 +132,7 @@ func (v *Server) GetRealm(ctx context.Context, request *proto.LookupRealmRequest
|
|||||||
Description: realm.Description,
|
Description: realm.Description,
|
||||||
IsPublic: realm.IsPublic,
|
IsPublic: realm.IsPublic,
|
||||||
IsCommunity: realm.IsCommunity,
|
IsCommunity: realm.IsCommunity,
|
||||||
|
AccessPolicy: hyper.EncodeAccessPolicy(realm.AccessPolicy),
|
||||||
}
|
}
|
||||||
if realm.Avatar != nil {
|
if realm.Avatar != nil {
|
||||||
info.Avatar = *realm.Avatar
|
info.Avatar = *realm.Avatar
|
||||||
|
Loading…
Reference in New Issue
Block a user