Commit Graph

206 Commits

Author SHA1 Message Date
Paul Catinean 20f69bbce9 [FIX] res.users: remove check_super duplication
Closes #8403
2015-09-07 11:07:43 +02:00
Olivier Dony 5e4c09ae53 [FIX] res.users: more consistent handling of user private fields 2015-08-07 13:15:45 +02:00
Olivier Dony 77868ec4f9 [FIX] base, auth_openid: wrong implementation of API by auth_openid
Authentication modules are supposed to override res_users.check_credentials()
in order to plug in their own mechanism, without actually modifying the
behavior of res_users.check(), res_users.authenticate() or
res_users._login().

auth_openid was incorrectly overriding check() instead of
check_credentials(), and unnecessarily accessing private
attributes of res_users. Fixing the implementation of auth_openid
to follow the API means we can completely make those attributes
private.
2015-08-06 19:21:12 +02:00
Olivier Dony 856bc6f2b1 [FIX] apply same visibility rules as base 2015-04-10 17:15:50 +02:00
Denis Ledoux a93ef48a70 [FIX] base: access to preferences menu for portal users
Since revs 53582c2ea6 & f65c913027,
this was no more possible for portal users to read groups
on purpose, for privacy reasons.

fields_get of res.users model is overriden, for
the access rights form view features
(The groups selections and checkboxes).
At each call to fields_get, which happens at each call
to fields_view_get on the res.users model, operations are
done on the model res.groups (basically, to
build the selection groups and checkboxes). So,
each time a view of model res.users is displayed,
whatever the view, operations on res.group model were performed.

The thing is, these operations on res.groups
are actually needed only for the user access rights
view, or at least only for users having the group
Administration > Access rights. These group operations
aren't needed for the preferences view, nor for portal users.

We therefore avoid to do these if the user is not part of the
Administration > Access rights group, which lead to
performances improvment, and solves the fact
portal users couldn't access their user preferences view.

opw-627391
2015-03-24 18:25:13 +01:00
Martin Trigaux 9f8731ca27 [FIX] base: backport of 152c5c2 to 7.0
[IMP] base: safer locking at user login

When a users connects, a lock is taken on the res_user table to modify the last login date. If another running transaction uses a foreign key to res.users (e.g. write_uid column), postgres may detect the update as a concurrent update and rollback the transaction.
In pg 9.3, the lock_strength parameter 'NO KEY' allows a weaker lock which is less likely to break another transaction.
Fixes #552
2015-01-22 13:34:19 +01:00
Sandy Carter 894143cb4c [FIX] res.groups: when generating initial group view, use admin context and language
This means group category names can be translated in the
default/installation database language.

Closes #3921
2015-01-15 11:54:22 +01:00
Denis Ledoux eeb1f0355c [FIX] res.users: exactly match login when operator in ilike, equal 2014-10-09 18:57:37 +02:00
Denis Ledoux 074c7b6c25 [FIX] res_users: do not copy login_date when duplicating users 2014-09-25 17:00:59 +02:00
Richard Mathot (OpenERP) f3b5913842 [IMP] res_group: more explicit constraint error message
bzr revid: rim@openerp.com-20140429071125-avjggwlmlozv7hz5
2014-04-29 09:11:25 +02:00
Denis Ledoux 3298051016 [FIX] base: search groups by full name not working with operators 'in' nor with operand boolean
bzr revid: dle@openerp.com-20140416112239-vl20z3xzgp61vygu
2014-04-16 13:22:39 +02:00
Xavier ALT bf324b417c [FIX] base: make explicit, that res.users reified fields are not selectable
bzr revid: xal@openerp.com-20131218111214-543cjhkp6k0steyi
2013-12-18 12:12:14 +01:00
Cecile Tonglet 5de64b65c6 [FIX] Calling read() on a not-existing user id crash instead of returning False
bzr revid: cto@openerp.com-20131210153519-4yx724gffll27fb5
2013-12-10 16:35:19 +01:00
Rifakat acd76079ba [FIX] fix demo data problem, now able to assign company to existing partner which does not have
any company. Did small variable name change

bzr revid: rha@tinyerp.com-20130801062706-imbu9ac2nimbd28f
2013-08-01 11:57:06 +05:30
Jigar Amin (OpenERP) d334814bf5 [merge] lp:openobject-server/7.0
bzr revid: jam@tinyerp.com-20130611051458-r4bg46apl7j6kfrf
2013-06-11 10:44:58 +05:30
Olivier Dony 4e366e01aa [FIX] res.users: prevent exporting the virtual "Access Rights" fields
A corresponding patch on openerp-web takes that
new field attribute into account.

bzr revid: odo@openerp.com-20130607093057-nujdeq39sqbx2cbo
2013-06-07 11:30:57 +02:00
Jigar Amin (OpenERP) 6d4215c9bf - Allow setting the company_id of the partner to False in order to make the partner shared between all companies.
bzr revid: jam@tinyerp.com-20130513060734-niodo4rzs0m1v073
2013-05-13 11:37:34 +05:30
Jigar Amin 356115167d [FIX] User Partner Company has to same as User Compnay not as usder company
bzr revid: jam@tinyerp.com-20130411094336-03i3475ydat8d5jj
2013-04-11 15:13:36 +05:30
Cedric Snauwaert 009ea40995 [FIX]res_users : add missing on_change function for res_user simplified view
bzr revid: csn@openerp.com-20130304105817-v3y9d9vupzhuiu2u
2013-03-04 11:58:17 +01:00
Christophe Simonis d48f07fef1 [FIX] base: allow admin to freeze the value of "web.base.url" config parameter.
This config parameter is automatically updated when the admin log-in.
As this value is mean to be used in emails and links given to users, we sometime don't want
it to be updated inconditionnaly. In some cases, the admin may use alternative, private or
even local uri to connect to the server, which may not be suitable for users

bzr revid: chs@openerp.com-20130301095551-fzrlwblnawxqj9di
2013-03-01 10:55:51 +01:00
Olivier Dony 5ab624b11e [FIX] res.users: context_get cache was not cleared properly, due to braindead implementation of ormcache (skiparg is misused and off by 1 in clear_cache)
Discarding the cache completely is suboptimal but
makes the code simpler, and this is not performance
critical anyway. The cache is mostly useful during
module installation, which involves no call to clear_cache.

bzr revid: odo@openerp.com-20121219101315-1ccuwm6nvmov12zv
2012-12-19 11:13:15 +01:00
Raphael Collet d98b1b0ff5 [IMP] res_groups: add m2m field to see view restrictions with given group
bzr revid: rco@openerp.com-20121218101916-r97xja82556schfg
2012-12-18 11:19:16 +01:00
Raphael Collet 57acd22a00 [MERGE] trunk-import-openerp-thu (use strict naming convention when importing openerp stuff)
bzr revid: rco@openerp.com-20121218085750-h0f50vi54q65ml5c
2012-12-18 09:57:50 +01:00
Olivier Dony 9bc690bf17 [IMP] res.users: enable cache on context_get, used by the _() translation function
When _() fails to find a context lang it looks
up the user language by calling context_get().
During module installation this may happen
thousands of times, and drastically slow down
the installation. Caching context_get calls
is an effective way to work around this,
until we find a better solution.

bzr revid: odo@openerp.com-20121217214700-6r7ju8iiaeowgj8i
2012-12-17 22:47:00 +01:00
Olivier Dony 9f77d2e2f4 [FIX] orm,registry: properly check m2o FKs during model update + fix some models `auto_init`ed multiple times
The case where no constraint existed at all was not working,
and after fixing it, the ORM started to re-create the same
constraints multiple times for some modules. This was for
models that are split within a module (such as res.users in
base, which is made of several small classes): all the
partial models were going through _auto_init instead
of only the final one - doing useless extra work.
      
Unfortunately establishing the FK happens before the
XML data files are loaded, so a number of FK and
NOT NULL constraints failed to apply due to missing
tables/records. base.sql had to be extended a bit
to cover these cases in a minimalist fashion

bzr revid: odo@openerp.com-20121217214645-av9n003yzterhujw
2012-12-17 22:46:45 +01:00
Cecile Tonglet 5f0070dcb6 [FIX] Remove unused imports and fix some imports that doesn't use the new namespace
bzr revid: cto@openerp.com-20121217143029-e9ki4ftwihq7pdme
2012-12-17 15:30:29 +01:00
Cecile Tonglet 5179507e22 [MERGE] Branch updated with trunk
bzr revid: cto@openerp.com-20121217125902-idtlh4ztyah17bdn
2012-12-17 13:59:02 +01:00
Olivier Dony 9aa0701836 [FIX] res.users: whitelist recently added `tz_offset` field so that users can read it on their own record (even the anonymous user)
bzr revid: odo@openerp.com-20121212210137-u0vwkth5wt0au6qc
2012-12-12 22:01:37 +01:00
Vo Minh Thu 509a084e79 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121210152723-mv4dykfu6ip1991h
2012-12-10 16:27:23 +01:00
Olivier Dony 8fba574007 [MERGE] Less intrusive timezone offset warning (corresponds to web branch)
bzr revid: odo@openerp.com-20121130174819-q8g6m5mhoaczcr8q
2012-11-30 18:48:19 +01:00
Fabien Meghazi dec5b8e761 [REM] Removed tz_offset from context and remove store=True
bzr revid: fme@openerp.com-20121129210033-p687bul10jiandxt
2012-11-29 22:00:33 +01:00
Olivier Dony 76eede3c21 [MERGE] Sync with trunk
bzr revid: odo@openerp.com-20121129114302-fdkq0kxb6wubsuaw
2012-11-29 12:43:02 +01:00
Antony Lesuisse 299d98ac6e [MERGE] res.users get_context add timezone offset
bzr revid: al@openerp.com-20121128155922-ff67gskivujvx2qa
2012-11-28 16:59:22 +01:00
Olivier Dony 7f5ad72429 [MERGE] Forward-port 6.1 bugfixes up to rev. 4307
rev.4307 = rev-id launchpad_translations_on_behalf_of_openerp-20121125065030-g5if5pybr61la4yj

bzr revid: odo@openerp.com-20121126160320-t2suuik6lhk6wl0x
bzr revid: odo@openerp.com-20121126161836-mv8yymzgbnmif4ve
bzr revid: odo@openerp.com-20121126162023-ejvsapwouyudw6c6
bzr revid: odo@openerp.com-20121126181527-d4yx15372bis77qj
2012-11-26 19:15:27 +01:00
Antony Lesuisse f5254e03ff [FIX] res.users last_login typodowan
bzr revid: al@openerp.com-20121122221200-2ut9pdc3z40b26r1
2012-11-22 23:12:00 +01:00
Fabien Meghazi ee8894d509 [ADD] Add tz_offset function field in res.partner and set it in user's context
bzr revid: fme@openerp.com-20121122151458-hvtrwogldt69djss
2012-11-22 16:14:58 +01:00
Olivier Dony 4f58796e38 [IMP] res.users: avoid spurious warnings when last login date cannot be updated
bzr revid: odo@openerp.com-20121120131610-v0xwu5zsbmxwvcwe
2012-11-20 14:16:10 +01:00
Thibault Delavallée 29e0ab965f [IMP] res_users: removed hack about redirecting the fields view get. Added a simplified contact form the the user, used for example when viewing a salesman profile.
bzr revid: tde@openerp.com-20121115103412-jl0o40t8d3d76ysd
2012-11-15 11:34:12 +01:00
niv-openerp 44bdf27363 [FIX] temporarily disabled a hack on res.users to use the partners view because it made a lot of views crash
bzr revid: nicolas.vanhoren@openerp.com-20121114110558-lylif3w917pjeu3y
2012-11-14 12:05:58 +01:00
Fabien Pinckaers 38a788897f [MERGE] remove widgets
bzr revid: fp@tinyerp.com-20121102093110-oforyy904v72hd6g
2012-11-02 10:31:10 +01:00
Bharat Devnani (OpenERP) bf9f129053 [MERGE] merged with main server
bzr revid: bde@tinyerp.com-20121025110526-px4l6quqgszdmsf8
2012-10-25 16:35:26 +05:30
Bharat Devnani (OpenERP) e8b56a15d2 [IMP] ordered res_users by user_name
bzr revid: bde@tinyerp.com-20121025105616-mcecvpsu2svvwryr
2012-10-25 16:26:16 +05:30
Antony Lesuisse aebe743964 [FIX] revert remove password fp merge
Overriding the reset password meachnism should be done in auth signup/reset password addons.

bzr revid: al@openerp.com-20121024111746-r94n1uqyb01a4x0m
2012-10-24 13:17:46 +02:00
Bharat Devnani (OpenERP) 1c0b768ec6 [MERGE] merged with main server
bzr revid: bde@tinyerp.com-20121023111122-tg9ve8pfwidqi5x2
2012-10-23 16:41:22 +05:30
Fabien Pinckaers 7501a8b9ad [MERGE] trunk-fp
bzr revid: fp@tinyerp.com-20121022174451-ez1yw4d37y3okfk6
2012-10-22 19:44:51 +02:00
Fabien Pinckaers fec5454b3b [MERGE] preference remove change passwd
bzr revid: fp@tinyerp.com-20121022171502-frmdoqnazzuzfk1j
2012-10-22 19:15:02 +02:00
Vo Minh Thu f4b6f015b3 [MERGE] merged trunk.
bzr revid: vmt@openerp.com-20121022095659-j1w8tdkkmwuhuniq
2012-10-22 11:56:59 +02:00
Pinakin Nayi (OpenERP) 50729e753f [IMP]users are sorted on name
bzr revid: pna@tinyerp.com-20121022055453-49hpyu9sf11gvunk
2012-10-22 11:24:53 +05:30
Raphael Collet 11051f32e0 [FIX] res_users.login: fix query parameters in cr.execute
bzr revid: rco@openerp.com-20121015100148-pkanx35vr6fqojuj
2012-10-15 12:01:48 +02:00
Nimesh (Open ERP) 69ecfa1480 [MERGE] merger with lp:openobject-server
bzr revid: nco@tinyerp.com-20121010052400-tp470p0h1yexump1
bzr revid: nco@tinyerp.com-20121011055444-th5ddxs1kw8cjtk9
2012-10-11 11:24:44 +05:30