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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user