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 (
28
28
)
29
29
30
30
var (
31
- actionNameRE = regexp .MustCompile (`^[a-z]+(\.[a-z]+)*$` )
31
+ actionName = `^[a-z_]+(\.[a-z_]+)*$`
32
+ actionNameRE = regexp .MustCompile (actionName )
32
33
)
33
34
34
35
func validateActionName (name string ) error {
35
36
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 )
37
38
}
38
39
39
40
return nil
Original file line number Diff line number Diff line change @@ -48,6 +48,10 @@ type Storage interface {
48
48
AssignUserToPolicy (ctx context.Context , user , policy string ) error
49
49
DetachUserFromPolicy (ctx context.Context , user , policy string ) error
50
50
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
+
51
55
GetPolicy (ctx context.Context , name string ) (* pbAuthorizationV1.AuthorizationV1Policy , error )
52
56
GetPolicies (ctx context.Context ) ([]* pbAuthorizationV1.AuthorizationV1Policy , error )
53
57
DeletePolicy (ctx context.Context , name string ) error
You can’t perform that action at this time.
0 commit comments