'Checks if update or delete are allowed in the current hierarchy.
With hierarchical projects, only the admin of the parent or the root
project has privilege to perform quota update and delete operations.
:param context_project: The project in which the user is scoped to.
:param target_project_id: The id of the project in which the
user want to perform an update or
delete operation.
:param parent_id: The parent id of the project in which the user
want to perform an update or delete operation.'

def _authorize_update_or_delete(self, context_project, target_project_id, parent_id):

    if context_project.is_admin_project:
        return
    if (context_project.parent_id and (parent_id != context_project.id)):
        msg = _('Update    and    delete    quota    operations    can    only    be    made    by    an    admin    of    immediate    parent    or    by    the    CLOUD    admin.')
        raise webob.exc.HTTPForbidden(explanation=msg)
    if (context_project.id != target_project_id):
        if (not self._is_descendant(target_project_id, context_project.subtree)):
            msg = _('Update    and    delete    quota    operations    can    only    be    made    to    projects    in    the    same    hierarchy    of    the    project    in    which    users    are    scoped    to.')
            raise webob.exc.HTTPForbidden(explanation=msg)
    else:
        msg = _('Update    and    delete    quota    operations    can    only    be    made    by    an    admin    of    immediate    parent    or    by    the    CLOUD    admin.')
        raise webob.exc.HTTPForbidden(explanation=msg)
