# HG changeset patch # User dfraser # Date 1242042536 0 # Node ID 8ffe90404a8cf47f3815483f863b7741cd901a70 # Parent 8d08cfaedbfc3e002993f5d397260c47f958af8c hide build configurations that user does not have rights to access in repository (silk) - fixes #384 diff --git a/bitten/web_ui.py b/bitten/web_ui.py --- a/bitten/web_ui.py +++ b/bitten/web_ui.py @@ -180,6 +180,14 @@ configs = [] for config in BuildConfig.select(self.env, include_inactive=show_all): + + repos = self.env.get_repository(req.authname) + if hasattr(repos, 'sync'): + repos.sync() + + if not repos.authz.has_permission(config.path): + continue + description = config.description if description: description = wiki_to_html(description, self.env, req) @@ -207,10 +215,6 @@ if not config.active: continue - repos = self.env.get_repository(req.authname) - if hasattr(repos, 'sync'): - repos.sync() - prev_rev = None for platform, rev, build in collect_changes(repos, config): if rev != prev_rev: