@staticmethod<EOL><INDENT>def get_user_permissions_on_view(view_name):<DEDENT>
_ret = list()<EOL>if current_user.is_authenticated:<EOL><INDENT>_current_user = current_user<EOL><DEDENT>elif current_user_jwt:<EOL><INDENT>_current_user = current_user_jwt<EOL><DEDENT>else:<EOL><INDENT>return _ret<EOL><DEDENT>for role in _current_user.roles:<EOL><INDENT>if role.permissions:<EOL><INDENT>for permission in role.permissions:<EOL><INDENT>if permission.view_menu.name == view_name:<EOL><INDENT>_ret.append(permission.permission.name)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return _ret<EOL>
Returns all current user permissions
     on a certain view/resource
:param view_name: The name of the view/resource/menu
:return: (list) with permissions