Changeset 1928

Show
Ignore:
Timestamp:
02/07/07 03:22:03 (2 years ago)
Author:
Chriki
Message:

RestrictedAreaPlugin:

clear error message for users of Trac versions <0.10.3 (cf. bug #1184)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • restrictedareaplugin/0.10/restrictedarea/filter.py

    r1923 r1928  
    2424    def pre_process_request(self, req, handler): 
    2525        for path in self.paths: 
     26            if req.perm is None: 
     27                # at least in Trac 0.10.2 req.perm seems to be always None ... 
     28                raise TracError("To use the RestrictedAreaPlugin you need at least Trac 0.10.3.") 
    2629            if req.path_info.startswith(path) and not req.perm.has_permission(self.__action_name): 
    2730                raise HTTPForbidden(to_unicode(PermissionError(self.__action_name)))