Skip to content

Commit 6b95e99

Browse files
committed
Fix RBAC to action-alias help and match api.
1 parent d940fd6 commit 6b95e99

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ Fixed
5151
* For "local-shell-script" runner, on readonly filesystems, don't attempt to run chmod +x on script_action. Fixes #5591
5252
Contributed by @jk464
5353

54+
* Fixed RBAC support to action-alias help and match end point. #6022
55+
Contributed by @nzlosh
56+
5457
Added
5558
~~~~~
5659
* Move `git clone` to `user_home/.st2packs` #5845

st2api/st2api/controllers/v1/actionalias.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def get_one(self, ref_or_id, requester_user):
7474
ref_or_id, requester_user=requester_user, permission_type=permission_type
7575
)
7676

77-
def match(self, action_alias_match_api):
77+
def match(self, action_alias_match_api, requester_user):
7878
"""
7979
Find a matching action alias.
8080
@@ -99,7 +99,7 @@ def match(self, action_alias_match_api):
9999
"representation": format_["representation"],
100100
}
101101

102-
def help(self, filter, pack, limit, offset, **kwargs):
102+
def help(self, filter, pack, limit, offset, requester_user, **kwargs):
103103
"""
104104
Get available help strings for action aliases.
105105

st2common/st2common/openapi.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,11 @@ paths:
806806
description: Object containing the format to be matched.
807807
schema:
808808
$ref: '#/definitions/ActionAliasMatchRequest'
809+
x-parameters:
810+
- name: user
811+
in: context
812+
x-as: requester_user
813+
description: User performing the operation.
809814
responses:
810815
'200':
811816
description: Action alias match pattern
@@ -840,6 +845,11 @@ paths:
840845
description: Number of actions alias to offset
841846
type: integer
842847
default: 0
848+
x-parameters:
849+
- name: user
850+
in: context
851+
x-as: requester_user
852+
description: User performing the operation.
843853
responses:
844854
'200':
845855
description: Action alias match pattern

st2common/st2common/openapi.yaml.j2

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,11 @@ paths:
802802
description: Object containing the format to be matched.
803803
schema:
804804
$ref: '#/definitions/ActionAliasMatchRequest'
805+
x-parameters:
806+
- name: user
807+
in: context
808+
x-as: requester_user
809+
description: User performing the operation.
805810
responses:
806811
'200':
807812
description: Action alias match pattern
@@ -836,6 +841,11 @@ paths:
836841
description: Number of actions alias to offset
837842
type: integer
838843
default: 0
844+
x-parameters:
845+
- name: user
846+
in: context
847+
x-as: requester_user
848+
description: User performing the operation.
839849
responses:
840850
'200':
841851
description: Action alias match pattern

0 commit comments

Comments
 (0)