incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [7/14] git commit: [#4637] Fixed read and create permissions for ShortUrl app
Date Tue, 25 Sep 2012 02:13:10 GMT
[#4637] Fixed read and create permissions for ShortUrl app

Signed-off-by: Cory Johns <johnsca@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 <johnsca@geek.net>
Authored: Mon Sep 24 13:56:19 2012 +0000
Committer: Cory Johns <johnsca@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'),


Mime
View raw message