~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/subject.py

  • Committer: William Grant
  • Date: 2009-02-27 04:47:06 UTC
  • Revision ID: grantw@unimelb.edu.au-20090227044706-w4infz8hr6ui3lve
SubjectsView is now only accessible by people associated with subjects.
GroupsView uses the offering's permission calculator.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    tab = 'subjects'
42
42
 
43
43
    def authorize(self, req):
44
 
        return req.user is not None
 
44
        if req.user is None:
 
45
            return False
 
46
        return req.user.enrolments.count() > 0
45
47
 
46
48
    def populate(self, req, ctx):
47
49
        ctx['semesters'] = []