Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/s/a/SAUCE-HEAD/sauce/controllers/submissions.py   SAUCE(Download)
    def _judge_permissions(self):
        '''Check current users permissions for judging and generate appropriate warnings'''
        if not request.allowance(self.submission):
            abort(403)
 
        try:
            if (getattr(request, 'user', None) == self.submission.user or
                    request.allowance(self.submission)):
                DBSession.delete(self.submission)
                DBSession.flush()

src/s/a/SAUCE-HEAD/sauce/lib/menu.py   SAUCE(Download)
 
            event = assignment.sheet.event
            if request.allowance(event):
                # Which lessons are we talking about?
                lessons = [l for l in event.lessons

src/s/a/SAUCE-HEAD/sauce/controllers/assignments.py   SAUCE(Download)
            abort(403)
        if (not self.assignment.is_active and
                not request.allowance(self.assignment)):
            flash('This assignment is not active, you may not create a submission', 'warning')
            redirect(url(self.assignment.url))