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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2010-02-12 04:00:39 UTC
  • Revision ID: matt.giuca@gmail.com-20100212040039-vw9yf8p4s98g6nu9
Added an argument 'config' to every single get_permissions method throughout the program. All calls to get_permissions pass a config. This is to allow per-site policy configurations on permissions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    """Rest view for adding an exercise."""
34
34
    
35
35
    #Only lecturers, tutors and admins can add exercises
36
 
    def get_permissions(self, user):
 
36
    def get_permissions(self, user, config):
37
37
        if user is not None:
38
38
            if user.admin:
39
39
                return set(['save'])