allura
Revisión | ae0468986ff1a10b7f0944421e8ec3d4e474dcd5 (tree) |
---|---|
Tiempo | 2011-04-28 03:48:21 |
Autor | Rick Copeland <rcopeland@geek...> |
Commiter | Rick Copeland |
[#1909] Handle cases where our database contains old, unknown permissions in the ACL
Signed-off-by: Rick Copeland <rcopeland@geek.net>
@@ -291,7 +291,11 @@ class DefaultAdminController(BaseController): | ||
291 | 291 | permissions = dict((p, []) for p in self.app.permissions) |
292 | 292 | for ace in self.app.config.acl: |
293 | 293 | if ace.access == model.ACE.ALLOW: |
294 | - permissions[ace.permission].append(ace.role_id) | |
294 | + try: | |
295 | + permissions[ace.permission].append(ace.role_id) | |
296 | + except KeyError: | |
297 | + # old, unknown permission | |
298 | + pass | |
295 | 299 | return dict( |
296 | 300 | app=self.app, |
297 | 301 | allow_config=has_access(c.project, 'admin')(), |