mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-24 16:47:47 +00:00
28 lines
748 B
Go
28 lines
748 B
Go
|
package auth
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
auth_pb "github.com/caos/zitadel/pkg/grpc/auth"
|
||
|
)
|
||
|
|
||
|
func (s *Server) ListMyZitadelPermissions(ctx context.Context, _ *auth_pb.ListMyZitadelPermissionsRequest) (*auth_pb.ListMyZitadelPermissionsResponse, error) {
|
||
|
perms, err := s.repo.SearchMyZitadelPermissions(ctx)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &auth_pb.ListMyZitadelPermissionsResponse{
|
||
|
Result: perms,
|
||
|
}, nil
|
||
|
}
|
||
|
|
||
|
func (s *Server) ListMyProjectPermissions(ctx context.Context, _ *auth_pb.ListMyProjectPermissionsRequest) (*auth_pb.ListMyProjectPermissionsResponse, error) {
|
||
|
perms, err := s.repo.SearchMyProjectPermissions(ctx)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return &auth_pb.ListMyProjectPermissionsResponse{
|
||
|
Result: perms,
|
||
|
}, nil
|
||
|
}
|