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

« back to all changes in this revision

Viewing changes to ivle/webapp/media.py

  • Committer: Matt Giuca
  • Date: 2010-07-21 04:21:50 UTC
  • Revision ID: matt.giuca@gmail.com-20100721042150-qovg2sth81sgbdq7
Project page: Replaced the confusing title 'Assigned submitters' with 'Expected submitters', and the heading 'assigned' with 'name'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
                return None
71
71
 
72
72
            # Unless it's a whitelisted path, we don't want to hear about it.
73
 
            if self.path not in extern[1]:
 
73
            # If the whitelist is None (not []), we allow all.
 
74
            if extern[1] is not None and self.path not in extern[1]:
74
75
                return None
75
76
 
76
77
            # Grab the admin-configured path for this particular external dep.
94
95
            return os.path.join(plugindir, mediadir, self.path)
95
96
 
96
97
class MediaFileView(BaseView):
97
 
    permission = None
 
98
    def authorize(self, req):
 
99
        return True
98
100
 
99
101
    def render(self, req):
100
102
        # If it begins with ".." or separator, it's illegal. Die.
130
132
    def get_filename(self, req):
131
133
        return self.context.filename
132
134
 
133
 
    def get_permissions(self, user, config):
134
 
        return set()
135
 
 
136
135
def root_to_media(root, *segments):
137
136
    if segments[0].startswith('+'):
138
137
        if segments[0] == '+external':