Changeset 4258

Show
Ignore:
Timestamp:
09/10/08 11:13:58 (2 months ago)
Author:
bobbysmith007
Message:

straightening out some permission stuff

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • timingandestimationplugin/branches/trac0.11-Permissions/timingandestimationplugin/webui.py

    r4255 r4258  
    99from trac.core import * 
    1010from trac.web import IRequestHandler 
     11from trac.perm import IPermissionRequestor 
    1112from trac.util import Markup 
    1213from trac.web.chrome import add_stylesheet, add_script, \ 
     
    2627    # IPermissionRequestor methods  
    2728    def get_permission_actions(self):  
    28         return ["TIME_VIEW", ("TIME_ADMIN", ["TIME_VIEW"]), ("TRAC_ADMIN", ["TIME_VIEW", "TIME_ADMIN"])]  
     29        return ["TIME_VIEW", ("TIME_ADMIN", ["TIME_VIEW"])]  
    2930 
    3031    def set_bill_date(self, username="Timing and Estimation Plugin",  when=0): 
     
    5960        if req.perm.has_permission("TIME_VIEW"): 
    6061            yield 'mainnav', "Billing", \ 
    61                   Markup('<a href="%s">%s</a>' % \ 
    62                          (url , "Time Reports")) 
     62                Markup('<a href="%s">%s</a>' % \ 
     63                           (url , "Time Reports")) 
    6364 
    6465    # IRequestHandler methods 
     
    8283    def process_request(self, req): 
    8384        messages = [] 
    84  
     85        req.perm.require("TIME_VIEW") 
    8586        def addMessage(s): 
    8687            messages.extend([s]);