3
0

Add filters to permissions for role route

It allows filtering for specific rules and also the rules which are applied to the resource, and not to a specific resource.

Introduces generic methods for RuleSet and FindRules method to access_control generation template.
This commit is contained in:
Vivek Patel
2022-07-06 11:17:49 +05:30
parent 149d75578a
commit f160d391f5
24 changed files with 712 additions and 14 deletions

View File

@@ -220,6 +220,8 @@ func (d *restEndpointParamDef) Parser(arg string) string {
return fmt.Sprintf("payload.Parse%s(%s), nil", export(d.Type), arg)
case "string", "[]string":
return fmt.Sprintf("%s, nil", arg)
case "filter.State":
return fmt.Sprintf("payload.ParseFilterState(%s), nil", arg)
default:
return fmt.Sprintf("%s(%s), nil", d.Type, arg)
}