Skip to content

Commit

Permalink
RBAC for action-alias help changelog entry.
Browse files Browse the repository at this point in the history
  • Loading branch information
nzlosh committed Sep 14, 2023
1 parent 1a3fab0 commit 5d710f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Fixed
* Bumped `paramiko` to `2.10.5` to fix an issue with SSH Certs - https://github.com/paramiko/paramiko/issues/2017
Contributed by @jk464

* Added RBAC support to action-alias help end point. #6022
Contributed by @nzlosh

Added
~~~~~
* Move `git clone` to `user_home/.st2packs` #5845
Expand Down
10 changes: 5 additions & 5 deletions st2api/st2api/controllers/v1/actionalias.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,21 @@ def help(self, filter, pack, limit, offset, **kwargs):
permission_type=permission_type,
)
aliases.append(ActionAliasAPI(**alias))
except ResourceTypeAccessDeniedError as exception:
except ResourceTypeAccessDeniedError:
# Permission denied, don't include in output.
pass
except Exception as exception:
LOG.exception(f"Error processing action-alias.")
LOG.exception("Error processing action-alias: %s" % str(exception))

return generate_helpstring_result(
aliases, filter, pack, int(limit), int(offset)
)
except (TypeError) as e:
except TypeError as exception_type:
LOG.exception(
"Helpstring request contains an invalid data type: %s.",
six.text_type(e),
six.text_type(exception_type),
)
return abort(http_client.BAD_REQUEST, six.text_type(e))
return abort(http_client.BAD_REQUEST, six.text_type(exception_type))

def post(self, action_alias, requester_user):
"""
Expand Down

0 comments on commit 5d710f3

Please sign in to comment.