commit
dd24eeb276
|
@ -13,11 +13,13 @@ db_filter_org = http.db_filter
|
|||
|
||||
|
||||
def db_filter(dbs, host=None):
|
||||
dbs = db_filter_org(dbs, host)
|
||||
dbs_orig = db_filter_org(dbs, host)
|
||||
httprequest = http.request.httprequest
|
||||
db_filter_hdr = httprequest.environ.get("HTTP_X_ODOO_DBFILTER")
|
||||
if db_filter_hdr:
|
||||
dbs = [db for db in dbs if re.match(db_filter_hdr, db)]
|
||||
else:
|
||||
dbs = dbs_orig
|
||||
return dbs
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue