Show
Ignore:
Timestamp:
02/22/08 15:02:26 (2 years ago)
Author:
JensDiemer
Message:

A new way to setup contextrobots?
I am not really convinced of it yet.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid/PyLucid/system/plugin_manager.py

    r1416 r1440  
    131131        # User must be login to use this method 
    132132        # http://www.djangoproject.com/documentation/authentication/ 
    133  
    134         request.must_login = True # For static_tags an the robot tag 
    135  
    136133        if request.user.is_anonymous(): 
    137134            # User is not logged in 
     
    148145            raise AccessDenied 
    149146 
     147    # set if the current request was viewable for anonymous user 
     148    # interesting for: <meta name="robots" content="{{ robots }}" /> 
     149    if request.anonymous_view == True: 
     150        # Only change anonymous_view, if it not set to False in the past. 
     151        if method_cfg["must_login"] or method_cfg["must_admin"]: 
     152            request.anonymous_view = False 
     153 
    150154    URLs = context["URLs"] 
    151155    URLs.current_plugin = plugin_name 
     
    193197    """ 
    194198    output = run(context, response, plugin_name, method_name, url_args) 
     199 
    195200    return output 
    196201