You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/09/25 04:13:10 UTC
[7/14] git commit: [#4637] Fixed read and create permissions for
ShortUrl app
[#4637] Fixed read and create permissions for ShortUrl app
Signed-off-by: Cory Johns <jo...@geek.net>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3ee13c0d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3ee13c0d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3ee13c0d
Branch: refs/heads/master
Commit: 3ee13c0de639861815b3e99a1ceb3a187f408731
Parents: 577a719
Author: Cory Johns <jo...@geek.net>
Authored: Mon Sep 24 13:56:19 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Mon Sep 24 13:56:59 2012 +0000
----------------------------------------------------------------------
ForgeShortUrl/forgeshorturl/main.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3ee13c0d/ForgeShortUrl/forgeshorturl/main.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/main.py b/ForgeShortUrl/forgeshorturl/main.py
index 986150d..3f4028d 100644
--- a/ForgeShortUrl/forgeshorturl/main.py
+++ b/ForgeShortUrl/forgeshorturl/main.py
@@ -36,7 +36,7 @@ class W:
class ForgeShortUrlApp(Application):
- permissions = ['create ', 'update', 'view_private']
+ permissions = ['read', 'create', 'update', 'view_private']
searchable = True
tool_label = 'URL shortener'
default_mount_label = 'URL shortener'
@@ -97,8 +97,10 @@ class ForgeShortUrlApp(Application):
self.config.options['project_name'] = project.name
super(ForgeShortUrlApp, self).install(project)
# Setup permissions
+ role_anon = M.ProjectRole.anonymous()._id
role_admin = M.ProjectRole.by_name('Admin')._id
self.config.acl = [
+ M.ACE.allow(role_anon, 'read'),
M.ACE.allow(role_admin, 'create'),
M.ACE.allow(role_admin, 'update'),
M.ACE.allow(role_admin, 'view_private'),