File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
integrations/authorization/v1/definition Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,13 @@ import (
2828)
2929
3030var (
31- actionNameRE = regexp .MustCompile (`^[a-z]+(\.[a-z]+)*$` )
31+ actionName = `^[a-z_]+(\.[a-z_]+)*$`
32+ actionNameRE = regexp .MustCompile (actionName )
3233)
3334
3435func validateActionName (name string ) error {
3536 if ! actionNameRE .MatchString (name ) {
36- return errors .Errorf ("Action `%s` does not match the regex" , name )
37+ return errors .Errorf ("Action `%s` does not match the regex `%s` " , name , actionName )
3738 }
3839
3940 return nil
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ type Storage interface {
4848 AssignUserToPolicy (ctx context.Context , user , policy string ) error
4949 DetachUserFromPolicy (ctx context.Context , user , policy string ) error
5050
51+ UserRoles (ctx context.Context , name string ) ([]* pbAuthorizationV1.AuthorizationV1Role , error )
52+ AssignUserToRole (ctx context.Context , user , role string ) error
53+ DetachUserFromRole (ctx context.Context , user , role string ) error
54+
5155 GetPolicy (ctx context.Context , name string ) (* pbAuthorizationV1.AuthorizationV1Policy , error )
5256 GetPolicies (ctx context.Context ) ([]* pbAuthorizationV1.AuthorizationV1Policy , error )
5357 DeletePolicy (ctx context.Context , name string ) error
You can’t perform that action at this time.
0 commit comments