diff rhodecode/controllers/admin/users.py @ 1758:a87aa385f21c beta

fixed repo_create permission by adding missing commit statements - added few tests for checking permission in UserModel - added __json__() into get_dict() to fetch from it hybrid_properties and any additional custom properties - code garden
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 06 Dec 2011 04:06:01 +0200
parents 8ecc6b8229a5
children cf51bbfb120e
line wrap: on
line diff
--- a/rhodecode/controllers/admin/users.py	Tue Dec 06 01:18:27 2011 +0200
+++ b/rhodecode/controllers/admin/users.py	Tue Dec 06 04:06:01 2011 +0200
@@ -197,7 +197,7 @@
             user_model.grant_perm(id, perm)
             h.flash(_("Granted 'repository create' permission to user"),
                     category='success')
-
+            Session.commit()
         else:
             perm = Permission.get_by_key('hg.create.repository')
             user_model.revoke_perm(id, perm)
@@ -206,5 +206,5 @@
             user_model.grant_perm(id, perm)
             h.flash(_("Revoked 'repository create' permission to user"),
                     category='success')
-
+            Session.commit()
         return redirect(url('edit_user', id=id))