Skip to content

Commit

Permalink
move getAuthz and getBuildmaster to ContextMixin
Browse files Browse the repository at this point in the history
ContextMixin depends on getAuthz, after all.  Fixes #963
  • Loading branch information
Dustin J. Mitchell committed Aug 16, 2010
1 parent bf83811 commit eedde19
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions master/buildbot/status/web/base.py
Expand Up @@ -184,6 +184,13 @@ def getStatus(self, request):
def getTitle(self, request):
return self.title

def getAuthz(self, request):
return request.site.buildbot_service.authz

def getBuildmaster(self, request):
return request.site.buildbot_service.master


class HtmlResource(resource.Resource, ContextMixin):
# this is a cheap sort of template thingy
contentType = "text/html; charset=utf-8"
Expand Down Expand Up @@ -240,12 +247,6 @@ def render(self, request):
return ''
return data

def getAuthz(self, request):
return request.site.buildbot_service.authz

def getBuildmaster(self, request):
return request.site.buildbot_service.master


class StaticHTML(HtmlResource):
def __init__(self, body, title):
Expand Down

0 comments on commit eedde19

Please sign in to comment.