From 24349601a0a2eca8c26c0d1825f91ba3cdcd119b Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Tue, 17 Apr 2012 15:29:17 -0500 Subject: [PATCH] has_permission applies to everybody --- VERSION | 2 +- gluon/tools.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8c568989..65065096 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.7 (2012-04-17 15:10:04) dev +Version 1.99.7 (2012-04-17 15:29:12) dev diff --git a/gluon/tools.py b/gluon/tools.py index d3ba13d1..b087801c 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -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: