use_control module doesn't check if module is installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
use_control module overrides the security.check function with the following code:
-------
def check(chk_fnct):
data = {}
def check_one(db, uid, passwd):
cr = pooler.
try:
# Check if the database is blocked
msg = cr.fetchone()
if msg:
# raise an Exception formatted for the client
# netsvc.
if (uid not in data) or (data[uid] < time.time()):
finally:
return chk_fnct(db, uid, passwd)
return check_one
# May be it's better using inheritancy and resubscribing the service
# Override the check method to store use of the database
from service import security
security.check = check(security.
-------
The problem is that the new "def check" function does not check if use_control_
So the function, once it has the pool/cursor, should search the database and see if the module is installed.
fixed by 13 <email address hidden>