allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [03/20] git commit: [#6392] ticket:432 Fix test fails due to new ACE.reason field
Date Tue, 24 Sep 2013 17:37:00 GMT
[#6392] ticket:432 Fix test fails due to new ACE.reason field


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4220cb20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4220cb20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4220cb20

Branch: refs/heads/master
Commit: 4220cb20ab00cb86c7c58a422bd1b37d6463125d
Parents: c85fad8
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Fri Sep 13 11:26:21 2013 +0300
Committer: Tim Van Steenburgh <tvansteenburgh@gmail.com>
Committed: Tue Sep 24 17:36:24 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/types.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4220cb20/Allura/allura/model/types.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/types.py b/Allura/allura/model/types.py
index 73c4b3b..2e14c86 100644
--- a/Allura/allura/model/types.py
+++ b/Allura/allura/model/types.py
@@ -37,9 +37,10 @@ class ACE(S.Object):
             **kwargs)
 
     @classmethod
-    def allow(cls, role_id, permission):
+    def allow(cls, role_id, permission, reason=None):
         return Object(
             access=cls.ALLOW,
+            reason=reason,
             role_id=role_id,
             permission=permission)
 
@@ -47,10 +48,9 @@ class ACE(S.Object):
     def deny(cls, role_id, permission, reason=None):
         ace = Object(
             access=cls.DENY,
+            reason=reason,
             role_id=role_id,
             permission=permission)
-        if reason:
-            ace.reason = reason
         return ace
 
     @classmethod


Mime
View raw message