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

« back to all changes in this revision

Viewing changes to ivle/webapp/base/test/test_rest.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:
7
7
 
8
8
class JSONRESTViewTestWithoutPUT(JSONRESTView):
9
9
    '''A small JSON REST view for testing purposes, without a PUT method.'''
10
 
    def get_permissions(self, user):
 
10
    def get_permissions(self, user, config):
11
11
        if user.login == u'fakeuser':
12
12
            return set(['view', 'edit'])
13
13
        if user.login == u'otheruser':