def METHOD_NAME(context, permission, method='allow', **kwargs):
    """Manage permissions.
    This API allows to manage RERO-ILS permission to allow/disallow any action
    for a user, a role or a system_role.
    :param context: the permission context request (role, system_role, user)
    :param permission: the name of the permission to manage.
    :param method: 'allow' or 'deny' this permission.
    :param kwargs: additional argument depending on the context
      for "role" :: `role_name`: the role name allowed/disallowed.
    :return: 200+json :: if the permission has been allowed.
             204+json :: if the permission has been disallowed.
             400 :: Missing or bad arguments
    """
    # TODO :: implements other SYSTEM_ROLE and USER context
    if context != PermissionContext.BY_ROLE:
        abort(501, 'This permission context management isn\'t yet implemented')
    try:
        if context == PermissionContext.BY_ROLE:
            role_name = kwargs.get('role_name')
            manage_role_permissions(method, permission, role_name)
    except NameError as ne:
        abort(400, str(ne))
    except Exception as e:
        abort(500, str(e))
    return jsonify({
        'context': context,
        'permission': permission,
        'method': method
    } | kwargs), 204 if method == 'deny' else 200