diff rhodecode/controllers/pullrequests.py @ 3141:a45191e7c7bb beta

access control: fix owner checks - they were always true The lambda expressions seems to be left over from something else. They were no longer executed and thus always evaluated to true. Some of the functions also failed if they were executed.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 02 Jan 2013 13:56:44 +0100
parents 324ed41c11b1
children 68f9c216377d
line wrap: on
line diff
--- a/rhodecode/controllers/pullrequests.py	Wed Jan 02 13:56:40 2013 +0100
+++ b/rhodecode/controllers/pullrequests.py	Wed Jan 02 13:56:44 2013 +0100
@@ -477,7 +477,7 @@
             #don't allow deleting comments on closed pull request
             raise HTTPForbidden()
 
-        owner = lambda: co.author.user_id == c.rhodecode_user.user_id
+        owner = co.author.user_id == c.rhodecode_user.user_id
         if h.HasPermissionAny('hg.admin', 'repository.admin')() or owner:
             ChangesetCommentsModel().delete(comment=co)
             Session().commit()