Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Fixed
* Fix ``TypeError`` when displaying help for actions whose parameters have no ``description`` key. #6375
* Fix utf-8 encode before checking paramter max size #6352
* Fix stuck running workflow tasks #6398 (by @guzzijones12@gmail.com)
* Fixed action-alias help API returning 500 when RBAC enabled. #6414 (by @nzlosh)

Changed
~~~~~~~
Expand Down
10 changes: 9 additions & 1 deletion st2api/st2api/controllers/v1/actionalias.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ def help(self, filter, pack, limit, offset, requester_user, **kwargs):
GET /actionalias/help
"""
try:
aliases_resp = super(ActionAliasController, self)._get_all(**kwargs)
permission_type = PermissionType.ACTION_ALIAS_HELP
rbac_utils = get_rbac_backend().get_utils_class()
rbac_utils.assert_user_has_permission(
user_db=requester_user,
permission_type=permission_type,
)
aliases_resp = super(ActionAliasController, self)._get_all(
requester_user=requester_user, **kwargs
)
aliases = [ActionAliasAPI(**alias) for alias in aliases_resp.json]
return generate_helpstring_result(
aliases, filter, pack, int(limit), int(offset)
Expand Down
Loading