summaryrefslogtreecommitdiff
path: root/bin/workflow/wkf_expr.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@tinyerp.com>2008-10-27 13:54:13 +0100
committerChristophe Simonis <chs@tinyerp.com>2008-10-27 13:54:13 +0100
commitf7273ecbc7c02772e76dcac90dee6e1cdd78b28e (patch)
tree16dd207c643b60de73a5fe704b2deb5cd1e66bdf /bin/workflow/wkf_expr.py
parent348d01795afc470032d81b2597206a430be77142 (diff)
admin user is not restricted by roles
bzr revid: chs@tinyerp.com-20081027125413-lusm89mme25cclm8
Diffstat (limited to 'bin/workflow/wkf_expr.py')
-rw-r--r--bin/workflow/wkf_expr.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/workflow/wkf_expr.py b/bin/workflow/wkf_expr.py
index 73573a231d2..d2d37edb3b3 100644
--- a/bin/workflow/wkf_expr.py
+++ b/bin/workflow/wkf_expr.py
@@ -101,8 +101,8 @@ def check(cr, workitem, ident, transition, signal):
if transition['signal']:
ok = (signal==transition['signal'])
- if transition['role_id']:
- uid = ident[0]
+ uid = ident[0]
+ if transition['role_id'] and uid != 1:
serv = netsvc.LocalService('object_proxy')
user_roles = serv.execute_cr(cr, uid, 'res.users', 'read', [uid], ['roles_id'])[0]['roles_id']
ok = ok and serv.execute_cr(cr, uid, 'res.roles', 'check', user_roles, transition['role_id'])