mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
a4763b1e4c
* features * features * features * fix json tags * add features handler to auth * mocks for tests * add setup step * fixes * add featurelist to auth api * grandfather state and typos * typo * merge new-eventstore * fix login policy tests * label policy in features * audit log retention
34 lines
893 B
Cheetah
34 lines
893 B
Cheetah
// 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 }} |