has_permission applies to everybody

This commit is contained in:
Massimo Di Pierro
2012-04-17 15:29:17 -05:00
parent f04a9c1881
commit 24349601a0
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.7 (2012-04-17 15:10:04) dev
Version 1.99.7 (2012-04-17 15:29:12) dev
+5
View File
@@ -2828,6 +2828,11 @@ class Auth(object):
if group_id is passed, it checks whether the group has the permission
"""
if not group_id and self.settings.everybody_group_id and \
self.has_permission(
name,table_name,record_id,user_id=None,
group_id=self.settings.everybody_group_id): return True
if not user_id and not group_id and self.user:
user_id = self.user.id
if user_id: