diff --git a/CHANGELOG.rst b/CHANGELOG.rst index dbe21c9523..f290ba9e84 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 diff --git a/st2api/st2api/controllers/v1/actionalias.py b/st2api/st2api/controllers/v1/actionalias.py index c1062a61fc..85e281a6f4 100644 --- a/st2api/st2api/controllers/v1/actionalias.py +++ b/st2api/st2api/controllers/v1/actionalias.py @@ -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): """