Anonymous committed cd597ff

[svn r7278] Replace trac 0.11'ism for permission checking with a trac 0.10 compatible

Addresses #6252.

  • Participants
  • Parent commits 8e21874

Comments (0)

Files changed (1)


         return 'builds'
     def get_navigation_items(self, req):
-        if self.nav_url and 'BUILD_VIEW' in req.perm:
+        if self.nav_url and req.perm.has_permission('BUILD_VIEW'):
             yield 'mainnav', 'builds', Markup('<a href="%s"%s>Builds</a>' % \
                         (self.nav_url, self.disp_tab and ' target="hudson"' or ''))
     # ITimelineEventProvider methods
     def get_timeline_filters(self, req):
-        if 'BUILD_VIEW' in req.perm:
+        if req.perm.has_permission('BUILD_VIEW'):
             yield ('build', 'Hudson Builds')
     def get_timeline_events(self, req, start, stop, filters):
-        if 'build' not in filters or 'BUILD_VIEW' not in req.perm:
+        if 'build' not in filters or not req.perm.has_permission('BUILD_VIEW'):
         # xml parsing helpers