Mercurial > kallithea
diff pylons_app/controllers/changelog.py @ 318:fdf9f6ee5217
Implemented permissions into hg app, secured admin controllers, templates and repository specific controllers
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 29 Jun 2010 20:45:03 +0200 |
parents | a61b19036de0 |
children | 46b7d108ea7a |
line wrap: on
line diff
--- a/pylons_app/controllers/changelog.py Tue Jun 29 20:43:01 2010 +0200 +++ b/pylons_app/controllers/changelog.py Tue Jun 29 20:45:03 2010 +0200 @@ -2,14 +2,6 @@ # encoding: utf-8 # changelog controller for pylons # Copyright (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com> -from json import dumps -from mercurial.graphmod import colored, CHANGESET, revisions as graph_rev -from pylons import request, session, tmpl_context as c -from pylons_app.lib.auth import LoginRequired -from pylons_app.lib.base import BaseController, render -from pylons_app.model.hg_model import HgModel -from webhelpers.paginate import Page -import logging # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -30,11 +22,21 @@ changelog controller for pylons @author: marcink """ -log = logging.getLogger(__name__) +from json import dumps +from mercurial.graphmod import colored, CHANGESET, revisions as graph_rev +from pylons import request, session, tmpl_context as c +from pylons_app.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator +from pylons_app.lib.base import BaseController, render +from pylons_app.model.hg_model import HgModel +from webhelpers.paginate import Page +import logging +log = logging.getLogger(__name__) class ChangelogController(BaseController): @LoginRequired() + @HasRepoPermissionAnyDecorator('repository.read', 'repository.write', + 'repository.admin') def __before__(self): super(ChangelogController, self).__before__()