def render_admin_panel(self, req, cat, page, path_info): self.store = CQDESuperUserStore.instance() if not self.store.is_superuser(req.authname): raise TracError("You should not see this view.", "Permission denied!") if req.method == 'POST': if req.args.get('add'): self.add_superuser(req) elif req.args.get('remove'): self.remove_superuser(req) return 'admin_superusers.html', {'super_users':self.store.get_superusers()}
def render_admin_panel(self, req, cat, page, path_info): self.store = CQDESuperUserStore.instance() if not self.store.is_superuser(req.authname): raise TracError("You should not see this view.", "Permission denied!") if req.method == 'POST': if req.args.get('add'): self.add_superuser(req) elif req.args.get('remove'): self.remove_superuser(req) return 'admin_superusers.html', { 'super_users': self.store.get_superusers() }
def get_admin_panels(self, req): store = CQDESuperUserStore.instance() if store.is_superuser(req.authname): yield ('permissions', _('Permissions'), 'superusers', _('Super users'))