// Code generated by protoc-gen-authmethod. DO NOT EDIT. package {{.File.GoPkg.Name}} import ( "google.golang.org/grpc" "github.com/caos/zitadel/internal/api/authz" "github.com/caos/zitadel/internal/api/grpc/server/middleware" ) {{ range $s := .File.Services }} /** * {{$s.Name}} */ const {{$s.Name}}_MethodPrefix = "{{$.File.Package}}.{{$s.Name}}" var {{$s.Name}}_AuthMethods = authz.MethodMapping { {{ range $m := $s.Method}} {{ $mAuthOpt := option $m.Options "zitadel.v1.auth_option" }} {{ if and $mAuthOpt (or $mAuthOpt.Permission $mAuthOpt.Feature) }} "/{{$.File.Package}}.{{$s.Name}}/{{.Name}}": authz.Option{ Permission: "{{$mAuthOpt.Permission}}", CheckParam: "{{$mAuthOpt.CheckFieldName}}", Feature: "{{$mAuthOpt.Feature}}", }, {{end}} {{ end}} } {{ end }}