Switch to unified view

a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
...
...
9
9
10
import allura.tasks.repo_tasks
10
import allura.tasks.repo_tasks
11
from allura import model as M
11
from allura import model as M
12
from allura.lib import validators as V
12
from allura.lib import validators as V
13
from allura.lib.oid_helper import verify_oid, process_oid
13
from allura.lib.oid_helper import verify_oid, process_oid
14
from allura.lib.security import require_authenticated, has_artifact_access
14
from allura.lib.security import require_authenticated, has_access
15
from allura.lib import helpers as h
15
from allura.lib import helpers as h
16
from allura.lib import plugin
16
from allura.lib import plugin
17
from allura.lib.decorators import require_post
17
from allura.lib.decorators import require_post
18
from allura.lib.widgets import SubscriptionForm, OAuthApplicationForm, OAuthRevocationForm, LoginForm
18
from allura.lib.widgets import SubscriptionForm, OAuthApplicationForm, OAuthRevocationForm, LoginForm
19
from allura.lib.widgets import forms
19
from allura.lib.widgets import forms
...
...
244
        c.app = project.app_instance(mount_point)
244
        c.app = project.app_instance(mount_point)
245
        if c.app is None:
245
        if c.app is None:
246
            log.info("Can't find repo at %s on repo_path %s",
246
            log.info("Can't find repo at %s on repo_path %s",
247
                     mount_point, repo_path)
247
                     mount_point, repo_path)
248
            return disallow
248
            return disallow
249
        return dict(allow_read=has_artifact_access('read')(user=user),
249
        return dict(allow_read=has_access(c.app, 'read')(user=user),
250
                    allow_write=has_artifact_access('write')(user=user),
250
                    allow_write=has_access(c.app, 'write')(user=user),
251
                    allow_create=has_artifact_access('create')(user=user))
251
                    allow_create=has_access(c.app, 'create')(user=user))
252
252
253
class PreferencesController(BaseController):
253
class PreferencesController(BaseController):
254
254
255
    @with_trailing_slash
255
    @with_trailing_slash
256
    @expose('jinja:allura:templates/user_preferences.html')
256
    @expose('jinja:allura:templates/user_preferences.html')