Beispiel #1
0
    def edit(self, id):
        c.review = Review.find_by_id(id)

        redirect_to(
            h.url_for(controller='proposal',
                      id=c.review.proposal.id,
                      action='review'))
Beispiel #2
0
    def delete(self, id):
        c.review = Review.find_by_id(id)

        if c.review.reviewer.id != h.signed_in_person().id:
            # Raise a no_auth error
            h.auth.no_role()

        return render('/review/confirm_delete.mako')
Beispiel #3
0
    def delete(self, id):
        c.review = Review.find_by_id(id)

        if c.review.reviewer.id != h.signed_in_person().id:
            # Raise a no_auth error
            h.auth.no_role()

        return render('/review/confirm_delete.mako')
Beispiel #4
0
    def _delete(self, id):
        c.review = Review.find_by_id(id)

        if c.review.reviewer.id != h.signed_in_person().id:
            # Raise a no_auth error
            h.auth.no_role()

        meta.Session.delete(c.review)
        meta.Session.commit()

        h.flash("Review Deleted")
        redirect_to(controller='review', action='index')
Beispiel #5
0
    def _delete(self, id):
        c.review = Review.find_by_id(id)

        if c.review.reviewer.id != h.signed_in_person().id:
            # Raise a no_auth error
            h.auth.no_role()

        meta.Session.delete(c.review)
        meta.Session.commit()

        h.flash("Review Deleted")
        redirect_to(controller='review', action='index')
Beispiel #6
0
    def view(self, id):
        c.review = Review.find_by_id(id)

        # TODO: currently not enough (see TODOs in model/proposal.py)
        #if not h.auth.authorized(h.auth.has_organiser_role):
        #    # You can't review your own proposal
        #    for person in c.review.proposal.people:
        #        if person.id == h.signed_in_person().id:
        #            h.auth.no_role()

        if c.review is None:
            redirect_to(action='index')

        return render('review/view.mako')
Beispiel #7
0
    def view(self, id):
        c.review = Review.find_by_id(id)

        # TODO: currently not enough (see TODOs in model/proposal.py)
        #if not h.auth.authorized(h.auth.has_organiser_role):
        #    # You can't review your own proposal
        #    for person in c.review.proposal.people:
        #        if person.id == h.signed_in_person().id:
        #            h.auth.no_role()

        if c.review is None:
            redirect_to(action='index')

        return render('review/view.mako')
Beispiel #8
0
    def edit(self, id):
        c.review = Review.find_by_id(id)

        redirect_to(h.url_for(controller='proposal', id=c.review.proposal.id, action='review'))