Mercurial > kallithea
diff rhodecode/model/users_group.py @ 2709:d2d35cf2b351 beta
RhodeCode now has a option to explicitly set forking permissions. ref #508
- changed the way permissons on users groups behave. Now explicit set on user
is more important than permission set on users group
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 10 Aug 2012 03:09:36 +0200 |
parents | 9d4b80743a2a |
children | 5f1850e4712a |
line wrap: on
line diff
--- a/rhodecode/model/users_group.py Wed Aug 08 23:30:55 2012 +0200 +++ b/rhodecode/model/users_group.py Fri Aug 10 03:09:36 2012 +0200 @@ -165,10 +165,8 @@ .filter(UsersGroupToPerm.permission == perm).scalar() is not None def grant_perm(self, users_group, perm): - if not isinstance(perm, Permission): - raise Exception('perm needs to be an instance of Permission class') - users_group = self.__get_users_group(users_group) + perm = self._get_perm(perm) # if this permission is already granted skip it _perm = UsersGroupToPerm.query()\