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 authored and Amber Yust committed Oct 19, 2010
1 parent 4a5b02b commit ade281e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions master/buildbot/status/web/base.py
Expand Up @@ -180,6 +180,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 @@ -236,12 +243,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 ade281e

Please sign in to comment.