Changeset 4369

Show
Ignore:
Timestamp:
10/02/08 00:31:16 (3 months ago)
Author:
pedro
Message:

added the reset_password to the non redirect pages. Add any other page to the paths list

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • noanonymousplugin/0.11/noanonymous/filter.py

    r4239 r4369  
    77from trac.perm import PermissionError 
    88from trac.admin.web_ui import AdminModule 
     9from trac.config import ListOption 
    910 
    1011class NoAnonymousModule(Component): 
     
    1819             
    1920    def post_process_request(self, req, template, data, content_type): 
     21         
     22        paths =['/login', '/reset_password'] 
     23         
    2024        try: 
    21             if req.authname == 'anonymous' and \ 
    22                not req.path_info.startswith('/login'): 
     25            if req.authname == 'anonymous': 
     26                for p in paths: 
     27                    if req.path_info.startswith(p): 
     28                        return template, data, content_type 
     29                     
    2330                # Anonymous user redirect to log in. 
    2431                req.redirect(req.href.login()) 
     
    3239             
    3340        return template, data, content_type 
    34