~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/browser/branchlisting.py

[r=sinzui][bug=892025] Hide the 'Configure code hosting' link if the
        user browsing the view does not have edit privs on the series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1416
1416
    @property
1417
1417
    def configure_codehosting(self):
1418
1418
        """Get the menu link for configuring code hosting."""
 
1419
        if not check_permission(
 
1420
            'launchpad.Edit', self.context.development_focus):
 
1421
            return None
1419
1422
        series_menu = MenuAPI(self.context.development_focus).overview
1420
1423
        set_branch = series_menu['set_branch']
1421
1424
        set_branch.text = 'Configure code hosting'