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

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/service.py

  • Committer: William Grant
  • Date: 2009-02-24 13:29:44 UTC
  • Revision ID: grantw@unimelb.edu.au-20090224132944-lm29zd1li1rjg77p
Privileges (apart from admin) are now offering-local, not global.

Offering privileges are granted by Enrolment.role, and global admin
by User.admin. ivle.caps is dead.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
        # XXX: Lecturers should be allowed to add worksheets Only to subjects
267
267
        #      under their control
268
268
        if user is not None:
269
 
            if user.rolenm == 'admin':
 
269
            if user.admin:
270
270
                return set(['save'])
271
271
            else:
272
272
                return set()
312
312
        # XXX: Lecturers should be allowed to add worksheets Only to subjects
313
313
        #      under their control
314
314
        if user is not None:
315
 
            if user.rolenm == 'admin':
 
315
            if user.admin:
316
316
                return set(['edit'])
317
317
            else:
318
318
                return set()