From e11fe64eca34e51ebe9fe77aa86af69503847476 Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Tue, 23 Jul 2013 12:21:53 +0100 Subject: [PATCH 01/29] Therp's modules to sync OpenERP with LDAP directories --- users_ldap_groups/__init__.py | 22 +++++ users_ldap_groups/__openerp__.py | 62 ++++++++++++ .../security/ir.model.access.csv | 2 + users_ldap_groups/users_ldap_groups.py | 98 +++++++++++++++++++ users_ldap_groups/users_ldap_groups.xml | 28 ++++++ .../users_ldap_groups_operators.py | 44 +++++++++ 6 files changed, 256 insertions(+) create mode 100644 users_ldap_groups/__init__.py create mode 100644 users_ldap_groups/__openerp__.py create mode 100644 users_ldap_groups/security/ir.model.access.csv create mode 100644 users_ldap_groups/users_ldap_groups.py create mode 100644 users_ldap_groups/users_ldap_groups.xml create mode 100644 users_ldap_groups/users_ldap_groups_operators.py diff --git a/users_ldap_groups/__init__.py b/users_ldap_groups/__init__.py new file mode 100644 index 0000000000..d359182a29 --- /dev/null +++ b/users_ldap_groups/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2012 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import users_ldap_groups diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py new file mode 100644 index 0000000000..b5755fb75a --- /dev/null +++ b/users_ldap_groups/__openerp__.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2012 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{ +"name" : "Groups assignment", +"version" : "1.0", +"depends" : ["auth_ldap"], +"author" : "Therp BV", +"description": """ +Adds user accounts to groups based on rules defined by the administrator. + +Usage: + +Define mappings in Settings->Companies->[your company]->tab configuration->[your +ldap server]. + +Decide whether you want only groups mapped from ldap (Only ldap groups=y) or a +mix of manually set groups and ldap groups (Only ldap groups=n). Setting this to +'no' will result in users never losing privileges when you remove them from a +ldap group, so that's a potential security issue. It is still the default to +prevent losing group information by accident. + +For active directory, use LDAP attribute 'memberOf' and operator 'contains'. +Fill in the DN of the windows group as value and choose an OpenERP group users +with this windows group are to be assigned to. + +For posix accounts, use operator 'query' and a value like +(&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid)) + +The operator query matches if the filter in value returns something, and value +can contain $[attribute] which will be replaced by the first value of the +user's ldap record's attribute named [attribute]. +""", +"category" : "Tools", +"data" : [ + 'users_ldap_groups.xml', + 'security/ir.model.access.csv', +], +"installable": True, +"external_dependencies" : { + 'python' : ['ldap'], +}, +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/users_ldap_groups/security/ir.model.access.csv b/users_ldap_groups/security/ir.model.access.csv new file mode 100644 index 0000000000..796730224c --- /dev/null +++ b/users_ldap_groups/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_res_company_ldap_groups,res_company_ldap_groups,model_res_company_ldap_group_mapping,base.group_system,1,1,1,1 diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py new file mode 100644 index 0000000000..59421f924e --- /dev/null +++ b/users_ldap_groups/users_ldap_groups.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2012 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import fields, orm +import logging +import users_ldap_groups_operators +import inspect +import sys + +class CompanyLDAPGroupMapping(orm.Model): + _name='res.company.ldap.group_mapping' + _rec_name='ldap_attribute' + _order='ldap_attribute' + + def _get_operators(self, cr, uid, context=None): + operators=[] + for name, operator in inspect.getmembers(users_ldap_groups_operators, + lambda cls: inspect.isclass(cls) + and cls!=users_ldap_groups_operators.LDAPOperator): + operators.append((name, name)) + return tuple(operators) + + _columns={ + 'ldap_id': fields.many2one('res.company.ldap', 'LDAP server', + required=True), + 'ldap_attribute': fields.char('LDAP attribute', size=64, + help='The LDAP attribute to check.\n' + 'For active directory, use memberOf.'), + 'operator': fields.selection(_get_operators, 'Operator', + help='The operator to check the attribute against the value\n' + 'For active directory, use \'contains\'', required=True), + 'value': fields.char('Value', size=1024, + help='The value to check the attribute against.\n' + 'For active directory, use the dn of the desired group', + required=True), + 'group': fields.many2one('res.groups', 'OpenERP group', + help='The OpenERP group to assign', required=True), + } + +class CompanyLDAP(orm.Model): + _inherit='res.company.ldap' + + _columns={ + 'group_mappings': fields.one2many('res.company.ldap.group_mapping', + 'ldap_id', 'Group mappings', + help='Define how OpenERP groups are assigned to ldap users'), + 'only_ldap_groups': fields.boolean('Only ldap groups', + help='If this is checked, manual changes to group membership are ' + 'undone on every login (so OpenERP groups are always synchronous ' + 'with LDAP groups). If not, manually added groups are preserved.') + } + + _default={ + 'only_ldap_groups': False + } + + def get_or_create_user(self, cr, uid, conf, login, ldap_entry, context=None): + user_id=super(CompanyLDAP, self).get_or_create_user(cr, uid, conf, login, + ldap_entry, context) + if not user_id: + return user_id + logger=logging.getLogger('users_ldap_groups') + mappingobj=self.pool.get('res.company.ldap.group_mapping') + userobj=self.pool.get('res.users') + conf_all=self.read(cr, uid, conf['id'], ['only_ldap_groups']) + if(conf_all['only_ldap_groups']): + logger.debug('deleting all groups from user %d' % user_id) + userobj.write(cr, uid, user_id, {'groups_id': [(5, )]}) + + for mapping in mappingobj.read(cr, uid, mappingobj.search(cr, uid, + [('ldap_id', '=', conf['id'])]), []): + operator=getattr(users_ldap_groups_operators, mapping['operator'])() + logger.debug('checking mapping %s' % mapping) + if operator.check_value(ldap_entry, mapping['ldap_attribute'], + mapping['value'], conf, self, logger): + logger.debug('adding user %d to group %s' % + (user_id, mapping['group'][1])) + userobj.write(cr, uid, user_id, + {'groups_id': [(4, mapping['group'][0])]}) + return user_id diff --git a/users_ldap_groups/users_ldap_groups.xml b/users_ldap_groups/users_ldap_groups.xml new file mode 100644 index 0000000000..3a9dce390e --- /dev/null +++ b/users_ldap_groups/users_ldap_groups.xml @@ -0,0 +1,28 @@ + + + + + res.company.form.inherit.users_ldap_groups + res.company + form + + + + + + + + + + + + + + + + + + + + + diff --git a/users_ldap_groups/users_ldap_groups_operators.py b/users_ldap_groups/users_ldap_groups_operators.py new file mode 100644 index 0000000000..9706459e95 --- /dev/null +++ b/users_ldap_groups/users_ldap_groups_operators.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2012 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from string import Template + +class LDAPOperator: + pass + +class contains(LDAPOperator): + def check_value(self, ldap_entry, attribute, value, ldap_config, company, + logger): + return (attribute in ldap_entry[1]) and (value in ldap_entry[1][attribute]) + +class equals(LDAPOperator): + def check_value(self, ldap_entry, attribute, value, ldap_config, company, + logger): + return (attribute in ldap_entry[1]) and (str(value)==str(ldap_entry[1][attribute])) + +class query(LDAPOperator): + def check_value(self, ldap_entry, attribute, value, ldap_config, company, + logger): + query_string=Template(value).safe_substitute(dict([(attribute, + ldap_entry[1][attribute][0]) for attribute in ldap_entry[1]])) + logger.debug('evaluating query group mapping, filter: %s'%query_string) + results=company.query(ldap_config, query_string) + logger.debug(results) + return bool(results) From 9cdba8ef0f81987b51f1a93059e7b6f8fb4653f4 Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Wed, 24 Jul 2013 13:53:38 +0100 Subject: [PATCH 02/29] FIX version numbers; view type is deprecated --- users_ldap_groups/__openerp__.py | 2 +- users_ldap_groups/users_ldap_groups.xml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py index b5755fb75a..98acddbab8 100644 --- a/users_ldap_groups/__openerp__.py +++ b/users_ldap_groups/__openerp__.py @@ -21,7 +21,7 @@ { "name" : "Groups assignment", -"version" : "1.0", +"version" : "1.2", "depends" : ["auth_ldap"], "author" : "Therp BV", "description": """ diff --git a/users_ldap_groups/users_ldap_groups.xml b/users_ldap_groups/users_ldap_groups.xml index 3a9dce390e..cee402bff1 100644 --- a/users_ldap_groups/users_ldap_groups.xml +++ b/users_ldap_groups/users_ldap_groups.xml @@ -4,7 +4,6 @@ res.company.form.inherit.users_ldap_groups res.company - form From 5d12ba7b93cd7eb6070ced278129a6aae9487bf3 Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Fri, 14 Mar 2014 13:45:14 -0400 Subject: [PATCH 03/29] Generate .pot files --- users_ldap_groups/i18n/users_ldap_groups.pot | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 users_ldap_groups/i18n/users_ldap_groups.pot diff --git a/users_ldap_groups/i18n/users_ldap_groups.pot b/users_ldap_groups/i18n/users_ldap_groups.pot new file mode 100644 index 0000000000..c83ab22af5 --- /dev/null +++ b/users_ldap_groups/i18n/users_ldap_groups.pot @@ -0,0 +1,16 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-03-14 17:41+0000\n" +"PO-Revision-Date: 2014-03-14 17:41+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + From cbee4a66aa60c2fec237d38abea23b8b0a9d456c Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Tue, 8 Apr 2014 09:38:19 +0200 Subject: [PATCH 04/29] Write needs list to browse. --- users_ldap_groups/users_ldap_groups.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py index 59421f924e..71db803381 100644 --- a/users_ldap_groups/users_ldap_groups.py +++ b/users_ldap_groups/users_ldap_groups.py @@ -83,7 +83,7 @@ def get_or_create_user(self, cr, uid, conf, login, ldap_entry, context=None): conf_all=self.read(cr, uid, conf['id'], ['only_ldap_groups']) if(conf_all['only_ldap_groups']): logger.debug('deleting all groups from user %d' % user_id) - userobj.write(cr, uid, user_id, {'groups_id': [(5, )]}) + userobj.write(cr, uid, [user_id], {'groups_id': [(5, )]}) for mapping in mappingobj.read(cr, uid, mappingobj.search(cr, uid, [('ldap_id', '=', conf['id'])]), []): @@ -93,6 +93,6 @@ def get_or_create_user(self, cr, uid, conf, login, ldap_entry, context=None): mapping['value'], conf, self, logger): logger.debug('adding user %d to group %s' % (user_id, mapping['group'][1])) - userobj.write(cr, uid, user_id, + userobj.write(cr, uid, [user_id], {'groups_id': [(4, mapping['group'][0])]}) return user_id From 304ea26fd5129ce5a117a4837ce1e0c7ee04f025 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 12 Jul 2014 12:02:52 +0200 Subject: [PATCH 05/29] move all modules to __unported__ on master branch and set installable=False --- users_ldap_groups/__init__.py | 22 ----- users_ldap_groups/__openerp__.py | 62 ------------ users_ldap_groups/i18n/users_ldap_groups.pot | 16 --- .../security/ir.model.access.csv | 2 - users_ldap_groups/users_ldap_groups.py | 98 ------------------- users_ldap_groups/users_ldap_groups.xml | 27 ----- .../users_ldap_groups_operators.py | 44 --------- 7 files changed, 271 deletions(-) delete mode 100644 users_ldap_groups/__init__.py delete mode 100644 users_ldap_groups/__openerp__.py delete mode 100644 users_ldap_groups/i18n/users_ldap_groups.pot delete mode 100644 users_ldap_groups/security/ir.model.access.csv delete mode 100644 users_ldap_groups/users_ldap_groups.py delete mode 100644 users_ldap_groups/users_ldap_groups.xml delete mode 100644 users_ldap_groups/users_ldap_groups_operators.py diff --git a/users_ldap_groups/__init__.py b/users_ldap_groups/__init__.py deleted file mode 100644 index d359182a29..0000000000 --- a/users_ldap_groups/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2012 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import users_ldap_groups diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py deleted file mode 100644 index 98acddbab8..0000000000 --- a/users_ldap_groups/__openerp__.py +++ /dev/null @@ -1,62 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2012 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -{ -"name" : "Groups assignment", -"version" : "1.2", -"depends" : ["auth_ldap"], -"author" : "Therp BV", -"description": """ -Adds user accounts to groups based on rules defined by the administrator. - -Usage: - -Define mappings in Settings->Companies->[your company]->tab configuration->[your -ldap server]. - -Decide whether you want only groups mapped from ldap (Only ldap groups=y) or a -mix of manually set groups and ldap groups (Only ldap groups=n). Setting this to -'no' will result in users never losing privileges when you remove them from a -ldap group, so that's a potential security issue. It is still the default to -prevent losing group information by accident. - -For active directory, use LDAP attribute 'memberOf' and operator 'contains'. -Fill in the DN of the windows group as value and choose an OpenERP group users -with this windows group are to be assigned to. - -For posix accounts, use operator 'query' and a value like -(&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid)) - -The operator query matches if the filter in value returns something, and value -can contain $[attribute] which will be replaced by the first value of the -user's ldap record's attribute named [attribute]. -""", -"category" : "Tools", -"data" : [ - 'users_ldap_groups.xml', - 'security/ir.model.access.csv', -], -"installable": True, -"external_dependencies" : { - 'python' : ['ldap'], -}, -} -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/users_ldap_groups/i18n/users_ldap_groups.pot b/users_ldap_groups/i18n/users_ldap_groups.pot deleted file mode 100644 index c83ab22af5..0000000000 --- a/users_ldap_groups/i18n/users_ldap_groups.pot +++ /dev/null @@ -1,16 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-03-14 17:41+0000\n" -"PO-Revision-Date: 2014-03-14 17:41+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - diff --git a/users_ldap_groups/security/ir.model.access.csv b/users_ldap_groups/security/ir.model.access.csv deleted file mode 100644 index 796730224c..0000000000 --- a/users_ldap_groups/security/ir.model.access.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_res_company_ldap_groups,res_company_ldap_groups,model_res_company_ldap_group_mapping,base.group_system,1,1,1,1 diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py deleted file mode 100644 index 71db803381..0000000000 --- a/users_ldap_groups/users_ldap_groups.py +++ /dev/null @@ -1,98 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2012 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import fields, orm -import logging -import users_ldap_groups_operators -import inspect -import sys - -class CompanyLDAPGroupMapping(orm.Model): - _name='res.company.ldap.group_mapping' - _rec_name='ldap_attribute' - _order='ldap_attribute' - - def _get_operators(self, cr, uid, context=None): - operators=[] - for name, operator in inspect.getmembers(users_ldap_groups_operators, - lambda cls: inspect.isclass(cls) - and cls!=users_ldap_groups_operators.LDAPOperator): - operators.append((name, name)) - return tuple(operators) - - _columns={ - 'ldap_id': fields.many2one('res.company.ldap', 'LDAP server', - required=True), - 'ldap_attribute': fields.char('LDAP attribute', size=64, - help='The LDAP attribute to check.\n' - 'For active directory, use memberOf.'), - 'operator': fields.selection(_get_operators, 'Operator', - help='The operator to check the attribute against the value\n' - 'For active directory, use \'contains\'', required=True), - 'value': fields.char('Value', size=1024, - help='The value to check the attribute against.\n' - 'For active directory, use the dn of the desired group', - required=True), - 'group': fields.many2one('res.groups', 'OpenERP group', - help='The OpenERP group to assign', required=True), - } - -class CompanyLDAP(orm.Model): - _inherit='res.company.ldap' - - _columns={ - 'group_mappings': fields.one2many('res.company.ldap.group_mapping', - 'ldap_id', 'Group mappings', - help='Define how OpenERP groups are assigned to ldap users'), - 'only_ldap_groups': fields.boolean('Only ldap groups', - help='If this is checked, manual changes to group membership are ' - 'undone on every login (so OpenERP groups are always synchronous ' - 'with LDAP groups). If not, manually added groups are preserved.') - } - - _default={ - 'only_ldap_groups': False - } - - def get_or_create_user(self, cr, uid, conf, login, ldap_entry, context=None): - user_id=super(CompanyLDAP, self).get_or_create_user(cr, uid, conf, login, - ldap_entry, context) - if not user_id: - return user_id - logger=logging.getLogger('users_ldap_groups') - mappingobj=self.pool.get('res.company.ldap.group_mapping') - userobj=self.pool.get('res.users') - conf_all=self.read(cr, uid, conf['id'], ['only_ldap_groups']) - if(conf_all['only_ldap_groups']): - logger.debug('deleting all groups from user %d' % user_id) - userobj.write(cr, uid, [user_id], {'groups_id': [(5, )]}) - - for mapping in mappingobj.read(cr, uid, mappingobj.search(cr, uid, - [('ldap_id', '=', conf['id'])]), []): - operator=getattr(users_ldap_groups_operators, mapping['operator'])() - logger.debug('checking mapping %s' % mapping) - if operator.check_value(ldap_entry, mapping['ldap_attribute'], - mapping['value'], conf, self, logger): - logger.debug('adding user %d to group %s' % - (user_id, mapping['group'][1])) - userobj.write(cr, uid, [user_id], - {'groups_id': [(4, mapping['group'][0])]}) - return user_id diff --git a/users_ldap_groups/users_ldap_groups.xml b/users_ldap_groups/users_ldap_groups.xml deleted file mode 100644 index cee402bff1..0000000000 --- a/users_ldap_groups/users_ldap_groups.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - res.company.form.inherit.users_ldap_groups - res.company - - - - - - - - - - - - - - - - - - - - - diff --git a/users_ldap_groups/users_ldap_groups_operators.py b/users_ldap_groups/users_ldap_groups_operators.py deleted file mode 100644 index 9706459e95..0000000000 --- a/users_ldap_groups/users_ldap_groups_operators.py +++ /dev/null @@ -1,44 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2012 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from string import Template - -class LDAPOperator: - pass - -class contains(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, - logger): - return (attribute in ldap_entry[1]) and (value in ldap_entry[1][attribute]) - -class equals(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, - logger): - return (attribute in ldap_entry[1]) and (str(value)==str(ldap_entry[1][attribute])) - -class query(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, - logger): - query_string=Template(value).safe_substitute(dict([(attribute, - ldap_entry[1][attribute][0]) for attribute in ldap_entry[1]])) - logger.debug('evaluating query group mapping, filter: %s'%query_string) - results=company.query(ldap_config, query_string) - logger.debug(results) - return bool(results) From a7de9aeb3b9021cecce5d41e442aea9b6eda00ce Mon Sep 17 00:00:00 2001 From: Giacomo Spettoli Date: Thu, 16 Jul 2015 11:43:51 +0200 Subject: [PATCH 06/29] start moving the users_ldap_groups outside the __unported__ folder --- users_ldap_groups/__init__.py | 22 ++++ users_ldap_groups/__openerp__.py | 62 ++++++++++ users_ldap_groups/i18n/users_ldap_groups.pot | 16 +++ .../security/ir.model.access.csv | 2 + users_ldap_groups/users_ldap_groups.py | 108 ++++++++++++++++++ users_ldap_groups/users_ldap_groups.xml | 27 +++++ .../users_ldap_groups_operators.py | 47 ++++++++ 7 files changed, 284 insertions(+) create mode 100644 users_ldap_groups/__init__.py create mode 100644 users_ldap_groups/__openerp__.py create mode 100644 users_ldap_groups/i18n/users_ldap_groups.pot create mode 100644 users_ldap_groups/security/ir.model.access.csv create mode 100644 users_ldap_groups/users_ldap_groups.py create mode 100644 users_ldap_groups/users_ldap_groups.xml create mode 100644 users_ldap_groups/users_ldap_groups_operators.py diff --git a/users_ldap_groups/__init__.py b/users_ldap_groups/__init__.py new file mode 100644 index 0000000000..d359182a29 --- /dev/null +++ b/users_ldap_groups/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2012 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +import users_ldap_groups diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py new file mode 100644 index 0000000000..190917a88c --- /dev/null +++ b/users_ldap_groups/__openerp__.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2012 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{ + "name": "Groups assignment", + "version": "1.2", + "depends": ["auth_ldap"], + "author": "Therp BV,Odoo Community Association (OCA)", + "license": "AGPL-3", + "description": """ +Adds user accounts to groups based on rules defined by the administrator. + +Usage: + +Define mappings in Settings->Companies->[your company]->tab configuration->[your +ldap server]. + +Decide whether you want only groups mapped from ldap (Only ldap groups=y) or a +mix of manually set groups and ldap groups (Only ldap groups=n). Setting this to +'no' will result in users never losing privileges when you remove them from a +ldap group, so that's a potential security issue. It is still the default to +prevent losing group information by accident. + +For active directory, use LDAP attribute 'memberOf' and operator 'contains'. +Fill in the DN of the windows group as value and choose an OpenERP group users +with this windows group are to be assigned to. + +For posix accounts, use operator 'query' and a value like +(&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid)) + +The operator query matches if the filter in value returns something, and value +can contain $[attribute] which will be replaced by the first value of the +user's ldap record's attribute named [attribute]. +""", + "category": "Tools", + "data": [ + 'users_ldap_groups.xml', + 'security/ir.model.access.csv', + ], + "installable": True, + "external_dependencies": { + 'python': ['ldap'], + }, +} diff --git a/users_ldap_groups/i18n/users_ldap_groups.pot b/users_ldap_groups/i18n/users_ldap_groups.pot new file mode 100644 index 0000000000..c83ab22af5 --- /dev/null +++ b/users_ldap_groups/i18n/users_ldap_groups.pot @@ -0,0 +1,16 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-03-14 17:41+0000\n" +"PO-Revision-Date: 2014-03-14 17:41+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + diff --git a/users_ldap_groups/security/ir.model.access.csv b/users_ldap_groups/security/ir.model.access.csv new file mode 100644 index 0000000000..796730224c --- /dev/null +++ b/users_ldap_groups/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_res_company_ldap_groups,res_company_ldap_groups,model_res_company_ldap_group_mapping,base.group_system,1,1,1,1 diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py new file mode 100644 index 0000000000..bca79a05a7 --- /dev/null +++ b/users_ldap_groups/users_ldap_groups.py @@ -0,0 +1,108 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2012 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import fields, orm +import logging +import users_ldap_groups_operators +import inspect + + +class CompanyLDAPGroupMapping(orm.Model): + _name = 'res.company.ldap.group_mapping' + _rec_name = 'ldap_attribute' + _order = 'ldap_attribute' + + def _get_operators(self, cr, uid, context=None): + operators = [] + members = inspect.getmembers( + users_ldap_groups_operators, + lambda cls: + inspect.isclass(cls) and + cls != users_ldap_groups_operators.LDAPOperator) + for name, operator in members: + operators.append((name, name)) + return tuple(operators) + + _columns = { + 'ldap_id': fields.many2one('res.company.ldap', 'LDAP server', required=True), + 'ldap_attribute': fields.char( + 'LDAP attribute', size=64, + help='The LDAP attribute to check.\n' + 'For active directory, use memberOf.'), + 'operator': fields.selection( + _get_operators, 'Operator', + help='The operator to check the attribute against the value\n' + 'For active directory, use \'contains\'', required=True), + 'value': fields.char( + 'Value', size=1024, + help='The value to check the attribute against.\n' + 'For active directory, use the dn of the desired group', + required=True), + 'group': fields.many2one( + 'res.groups', 'OpenERP group', + help='The OpenERP group to assign', required=True), + } + + +class CompanyLDAP(orm.Model): + _inherit = 'res.company.ldap' + + _columns = { + 'group_mappings': fields.one2many( + 'res.company.ldap.group_mapping', + 'ldap_id', 'Group mappings', + help='Define how OpenERP groups are assigned to ldap users'), + 'only_ldap_groups': fields.boolean( + 'Only ldap groups', + help='If this is checked, manual changes to group membership are ' + 'undone on every login (so OpenERP groups are always synchronous ' + 'with LDAP groups). If not, manually added groups are preserved.') + } + + _default = { + 'only_ldap_groups': False, + } + + def get_or_create_user(self, cr, uid, conf, login, ldap_entry, context=None): + user_id = super(CompanyLDAP, self).get_or_create_user(cr, uid, conf, login, + ldap_entry, context) + if not user_id: + return user_id + logger = logging.getLogger('users_ldap_groups') + mappingobj = self.pool.get('res.company.ldap.group_mapping') + userobj = self.pool.get('res.users') + conf_all = self.read(cr, uid, conf['id'], ['only_ldap_groups']) + if(conf_all['only_ldap_groups']): + logger.debug('deleting all groups from user %d' % user_id) + userobj.write(cr, uid, [user_id], {'groups_id': [(5, )]}, context=context) + + for mapping in mappingobj.read(cr, uid, mappingobj.search( + cr, uid, [('ldap_id', '=', conf['id'])]), []): + operator = getattr(users_ldap_groups_operators, mapping['operator'])() + logger.debug('checking mapping %s' % mapping) + if operator.check_value(ldap_entry, mapping['ldap_attribute'], + mapping['value'], conf, self, logger): + logger.debug('adding user %d to group %s' % + (user_id, mapping['group'][1])) + userobj.write(cr, uid, [user_id], + {'groups_id': [(4, mapping['group'][0])]}, + context=context) + return user_id diff --git a/users_ldap_groups/users_ldap_groups.xml b/users_ldap_groups/users_ldap_groups.xml new file mode 100644 index 0000000000..cee402bff1 --- /dev/null +++ b/users_ldap_groups/users_ldap_groups.xml @@ -0,0 +1,27 @@ + + + + + res.company.form.inherit.users_ldap_groups + res.company + + + + + + + + + + + + + + + + + + + + + diff --git a/users_ldap_groups/users_ldap_groups_operators.py b/users_ldap_groups/users_ldap_groups_operators.py new file mode 100644 index 0000000000..4de745fbf4 --- /dev/null +++ b/users_ldap_groups/users_ldap_groups_operators.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# This module copyright (C) 2012 Therp BV (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## +from string import Template + + +class LDAPOperator: + pass + + +class contains(LDAPOperator): + def check_value(self, ldap_entry, attribute, value, ldap_config, company, logger): + return (attribute in ldap_entry[1]) and (value in ldap_entry[1][attribute]) + + +class equals(LDAPOperator): + def check_value(self, ldap_entry, attribute, value, ldap_config, company, logger): + return attribute in ldap_entry[1] and unicode(value) == unicode(ldap_entry[1][attribute]) + + +class query(LDAPOperator): + def check_value(self, ldap_entry, attribute, value, ldap_config, company, logger): + query_string = Template(value).safe_substitute(dict( + [(attr, ldap_entry[1][attribute][0]) for attr in ldap_entry[1]] + ) + ) + logger.debug('evaluating query group mapping, filter: %s' % query_string) + results = company.query(ldap_config, query_string) + logger.debug(results) + return bool(results) From b397e38976b194b766f9f69845245281cfbe4295 Mon Sep 17 00:00:00 2001 From: Giacomo Spettoli Date: Thu, 16 Jul 2015 13:41:38 +0200 Subject: [PATCH 07/29] porting to v8 --- users_ldap_groups/__init__.py | 2 +- users_ldap_groups/__openerp__.py | 10 +-- users_ldap_groups/users_ldap_groups.py | 80 ++++++++++--------- .../users_ldap_groups_operators.py | 18 +++-- 4 files changed, 59 insertions(+), 51 deletions(-) diff --git a/users_ldap_groups/__init__.py b/users_ldap_groups/__init__.py index d359182a29..4db4e4cb2c 100644 --- a/users_ldap_groups/__init__.py +++ b/users_ldap_groups/__init__.py @@ -19,4 +19,4 @@ # ############################################################################## -import users_ldap_groups +import users_ldap_groups # noqa diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py index 190917a88c..9b63fec869 100644 --- a/users_ldap_groups/__openerp__.py +++ b/users_ldap_groups/__openerp__.py @@ -30,13 +30,13 @@ Usage: -Define mappings in Settings->Companies->[your company]->tab configuration->[your -ldap server]. +Define mappings in Settings->Companies->[your company]->tab configuration->[ +your ldap server]. Decide whether you want only groups mapped from ldap (Only ldap groups=y) or a -mix of manually set groups and ldap groups (Only ldap groups=n). Setting this to -'no' will result in users never losing privileges when you remove them from a -ldap group, so that's a potential security issue. It is still the default to +mix of manually set groups and ldap groups (Only ldap groups=n). Setting this +to 'no' will result in users never losing privileges when you remove them from +a ldap group, so that's a potential security issue. It is still the default to prevent losing group information by accident. For active directory, use LDAP attribute 'memberOf' and operator 'contains'. diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py index bca79a05a7..5dcdaed31d 100644 --- a/users_ldap_groups/users_ldap_groups.py +++ b/users_ldap_groups/users_ldap_groups.py @@ -19,18 +19,20 @@ # ############################################################################## -from openerp.osv import fields, orm +from openerp import models +from openerp import fields +from openerp import api import logging import users_ldap_groups_operators import inspect -class CompanyLDAPGroupMapping(orm.Model): +class CompanyLDAPGroupMapping(models.Model): _name = 'res.company.ldap.group_mapping' _rec_name = 'ldap_attribute' _order = 'ldap_attribute' - def _get_operators(self, cr, uid, context=None): + def _get_operators(self): operators = [] members = inspect.getmembers( users_ldap_groups_operators, @@ -41,49 +43,47 @@ def _get_operators(self, cr, uid, context=None): operators.append((name, name)) return tuple(operators) - _columns = { - 'ldap_id': fields.many2one('res.company.ldap', 'LDAP server', required=True), - 'ldap_attribute': fields.char( - 'LDAP attribute', size=64, - help='The LDAP attribute to check.\n' - 'For active directory, use memberOf.'), - 'operator': fields.selection( - _get_operators, 'Operator', - help='The operator to check the attribute against the value\n' - 'For active directory, use \'contains\'', required=True), - 'value': fields.char( - 'Value', size=1024, - help='The value to check the attribute against.\n' - 'For active directory, use the dn of the desired group', - required=True), - 'group': fields.many2one( - 'res.groups', 'OpenERP group', - help='The OpenERP group to assign', required=True), - } + ldap_id = fields.Many2one('res.company.ldap', 'LDAP server', required=True) + ldap_attribute = fields.Char( + 'LDAP attribute', size=64, + help='The LDAP attribute to check.\n' + 'For active directory, use memberOf.') + operator = fields.Selection( + _get_operators, 'Operator', + help='The operator to check the attribute against the value\n' + 'For active directory, use \'contains\'', required=True) + value = fields.Char( + 'Value', size=1024, + help='The value to check the attribute against.\n' + 'For active directory, use the dn of the desired group', + required=True) + group = fields.Many2one( + 'res.groups', 'OpenERP group', + help='The OpenERP group to assign', required=True) -class CompanyLDAP(orm.Model): +class CompanyLDAP(models.Model): _inherit = 'res.company.ldap' - _columns = { - 'group_mappings': fields.one2many( - 'res.company.ldap.group_mapping', - 'ldap_id', 'Group mappings', - help='Define how OpenERP groups are assigned to ldap users'), - 'only_ldap_groups': fields.boolean( - 'Only ldap groups', - help='If this is checked, manual changes to group membership are ' - 'undone on every login (so OpenERP groups are always synchronous ' - 'with LDAP groups). If not, manually added groups are preserved.') - } + group_mappings = fields.One2many( + 'res.company.ldap.group_mapping', + 'ldap_id', 'Group mappings', + help='Define how OpenERP groups are assigned to ldap users') + only_ldap_groups = fields.Boolean( + 'Only ldap groups', + help='If this is checked, manual changes to group membership are ' + 'undone on every login (so OpenERP groups are always synchronous ' + 'with LDAP groups). If not, manually added groups are preserved.') _default = { 'only_ldap_groups': False, } - def get_or_create_user(self, cr, uid, conf, login, ldap_entry, context=None): - user_id = super(CompanyLDAP, self).get_or_create_user(cr, uid, conf, login, - ldap_entry, context) + @api.multi + def get_or_create_user(self, cr, uid, conf, login, ldap_entry, + context=None): + user_id = super(CompanyLDAP, self).get_or_create_user( + cr, uid, conf, login, ldap_entry, context) if not user_id: return user_id logger = logging.getLogger('users_ldap_groups') @@ -92,11 +92,13 @@ def get_or_create_user(self, cr, uid, conf, login, ldap_entry, context=None): conf_all = self.read(cr, uid, conf['id'], ['only_ldap_groups']) if(conf_all['only_ldap_groups']): logger.debug('deleting all groups from user %d' % user_id) - userobj.write(cr, uid, [user_id], {'groups_id': [(5, )]}, context=context) + userobj.write( + cr, uid, [user_id], {'groups_id': [(5, )]}, context=context) for mapping in mappingobj.read(cr, uid, mappingobj.search( cr, uid, [('ldap_id', '=', conf['id'])]), []): - operator = getattr(users_ldap_groups_operators, mapping['operator'])() + operator = getattr(users_ldap_groups_operators, + mapping['operator'])() logger.debug('checking mapping %s' % mapping) if operator.check_value(ldap_entry, mapping['ldap_attribute'], mapping['value'], conf, self, logger): diff --git a/users_ldap_groups/users_ldap_groups_operators.py b/users_ldap_groups/users_ldap_groups_operators.py index 4de745fbf4..e4354a825a 100644 --- a/users_ldap_groups/users_ldap_groups_operators.py +++ b/users_ldap_groups/users_ldap_groups_operators.py @@ -26,22 +26,28 @@ class LDAPOperator: class contains(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, logger): - return (attribute in ldap_entry[1]) and (value in ldap_entry[1][attribute]) + def check_value(self, ldap_entry, attribute, value, ldap_config, company, + logger): + return (attribute in ldap_entry[1]) and \ + (value in ldap_entry[1][attribute]) class equals(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, logger): - return attribute in ldap_entry[1] and unicode(value) == unicode(ldap_entry[1][attribute]) + def check_value(self, ldap_entry, attribute, value, ldap_config, company, + logger): + return attribute in ldap_entry[1] and \ + unicode(value) == unicode(ldap_entry[1][attribute]) class query(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, logger): + def check_value(self, ldap_entry, attribute, value, ldap_config, company, + logger): query_string = Template(value).safe_substitute(dict( [(attr, ldap_entry[1][attribute][0]) for attr in ldap_entry[1]] ) ) - logger.debug('evaluating query group mapping, filter: %s' % query_string) + logger.debug('evaluating query group mapping, filter: %s' % + query_string) results = company.query(ldap_config, query_string) logger.debug(results) return bool(results) From be85afe79b06dff34ebcbe8f13b775220669e228 Mon Sep 17 00:00:00 2001 From: Giacomo Spettoli Date: Thu, 16 Jul 2015 15:52:59 +0200 Subject: [PATCH 08/29] move to new apis --- users_ldap_groups/users_ldap_groups.py | 32 +++++++++++--------------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py index 5dcdaed31d..6aec46d321 100644 --- a/users_ldap_groups/users_ldap_groups.py +++ b/users_ldap_groups/users_ldap_groups.py @@ -79,32 +79,28 @@ class CompanyLDAP(models.Model): 'only_ldap_groups': False, } - @api.multi - def get_or_create_user(self, cr, uid, conf, login, ldap_entry, - context=None): + @api.model + def get_or_create_user(self, conf, login, ldap_entry): + id_ = conf['id'] + this = self.browse(id_) user_id = super(CompanyLDAP, self).get_or_create_user( - cr, uid, conf, login, ldap_entry, context) + conf, login, ldap_entry) if not user_id: return user_id + userobj = self.env['res.users'] + user = userobj.browse(user_id) logger = logging.getLogger('users_ldap_groups') - mappingobj = self.pool.get('res.company.ldap.group_mapping') - userobj = self.pool.get('res.users') - conf_all = self.read(cr, uid, conf['id'], ['only_ldap_groups']) - if(conf_all['only_ldap_groups']): + if self.only_ldap_groups: logger.debug('deleting all groups from user %d' % user_id) - userobj.write( - cr, uid, [user_id], {'groups_id': [(5, )]}, context=context) + userobj.write([user_id], {'groups_id': [(5, )]}) - for mapping in mappingobj.read(cr, uid, mappingobj.search( - cr, uid, [('ldap_id', '=', conf['id'])]), []): - operator = getattr(users_ldap_groups_operators, - mapping['operator'])() + for mapping in this.group_mappings: + operator = mapping.operator + operator = getattr(users_ldap_groups_operators, mapping.operator)() logger.debug('checking mapping %s' % mapping) if operator.check_value(ldap_entry, mapping['ldap_attribute'], mapping['value'], conf, self, logger): logger.debug('adding user %d to group %s' % - (user_id, mapping['group'][1])) - userobj.write(cr, uid, [user_id], - {'groups_id': [(4, mapping['group'][0])]}, - context=context) + (user_id, mapping.group.name)) + user.write({'groups_id': [(4, mapping.group.id)]}) return user_id From 4834b56231561f57732e76dcaeb78144e00a8dec Mon Sep 17 00:00:00 2001 From: Giacomo Spettoli Date: Thu, 16 Jul 2015 16:00:39 +0200 Subject: [PATCH 09/29] fix missing new api call --- users_ldap_groups/users_ldap_groups.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py index 6aec46d321..68b925c675 100644 --- a/users_ldap_groups/users_ldap_groups.py +++ b/users_ldap_groups/users_ldap_groups.py @@ -92,7 +92,7 @@ def get_or_create_user(self, conf, login, ldap_entry): logger = logging.getLogger('users_ldap_groups') if self.only_ldap_groups: logger.debug('deleting all groups from user %d' % user_id) - userobj.write([user_id], {'groups_id': [(5, )]}) + user.write({'groups_id': [(5, )]}) for mapping in this.group_mappings: operator = mapping.operator From fff1ae42945a03923e0513a4e58162a89e08b8e4 Mon Sep 17 00:00:00 2001 From: Giacomo Spettoli Date: Thu, 16 Jul 2015 20:49:16 +0200 Subject: [PATCH 10/29] some makeup and change the ldap operators from plain python objects to a transientmodel --- users_ldap_groups/README.rst | 64 +++++++++++++++++++ users_ldap_groups/__init__.py | 2 +- users_ldap_groups/__openerp__.py | 22 ------- users_ldap_groups/users_ldap_groups.py | 54 +++++++++++----- .../users_ldap_groups_operators.py | 53 --------------- 5 files changed, 103 insertions(+), 92 deletions(-) create mode 100644 users_ldap_groups/README.rst delete mode 100644 users_ldap_groups/users_ldap_groups_operators.py diff --git a/users_ldap_groups/README.rst b/users_ldap_groups/README.rst new file mode 100644 index 0000000000..2dbc81de36 --- /dev/null +++ b/users_ldap_groups/README.rst @@ -0,0 +1,64 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +users_ldap_groups +================= + +Adds user accounts to groups based on rules defined by the administrator. + + +Usage +===== + +Define mappings in Settings->Companies->[your company]->tab configuration->[ +your ldap server]. + +Decide whether you want only groups mapped from ldap (Only ldap groups=y) or a +mix of manually set groups and ldap groups (Only ldap groups=n). Setting this +to 'no' will result in users never losing privileges when you remove them from +a ldap group, so that's a potential security issue. It is still the default to +prevent losing group information by accident. + +For active directory, use LDAP attribute 'memberOf' and operator 'contains'. +Fill in the DN of the windows group as value and choose an OpenERP group users +with this windows group are to be assigned to. + +For posix accounts, use operator 'query' and a value like +(&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid)) + +The operator query matches if the filter in value returns something, and value +can contain $[attribute] which will be replaced by the first value of the +user's ldap record's attribute named [attribute]. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. + + +Credits +======= + +Contributors +------------ + +* Therp BV +* Giacomo Spettoli + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/users_ldap_groups/__init__.py b/users_ldap_groups/__init__.py index 4db4e4cb2c..d1066f41bf 100644 --- a/users_ldap_groups/__init__.py +++ b/users_ldap_groups/__init__.py @@ -19,4 +19,4 @@ # ############################################################################## -import users_ldap_groups # noqa +from . import users_ldap_groups diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py index 9b63fec869..6014447dc8 100644 --- a/users_ldap_groups/__openerp__.py +++ b/users_ldap_groups/__openerp__.py @@ -27,28 +27,6 @@ "license": "AGPL-3", "description": """ Adds user accounts to groups based on rules defined by the administrator. - -Usage: - -Define mappings in Settings->Companies->[your company]->tab configuration->[ -your ldap server]. - -Decide whether you want only groups mapped from ldap (Only ldap groups=y) or a -mix of manually set groups and ldap groups (Only ldap groups=n). Setting this -to 'no' will result in users never losing privileges when you remove them from -a ldap group, so that's a potential security issue. It is still the default to -prevent losing group information by accident. - -For active directory, use LDAP attribute 'memberOf' and operator 'contains'. -Fill in the DN of the windows group as value and choose an OpenERP group users -with this windows group are to be assigned to. - -For posix accounts, use operator 'query' and a value like -(&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid)) - -The operator query matches if the filter in value returns something, and value -can contain $[attribute] which will be replaced by the first value of the -user's ldap record's attribute named [attribute]. """, "category": "Tools", "data": [ diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py index 68b925c675..b99ae0feaa 100644 --- a/users_ldap_groups/users_ldap_groups.py +++ b/users_ldap_groups/users_ldap_groups.py @@ -23,8 +23,36 @@ from openerp import fields from openerp import api import logging -import users_ldap_groups_operators -import inspect +from string import Template + + +class LDAPOperator(models.TransientModel): + _name = "res.company.ldap.operator" + + def operators(self): + return ('contains', 'equals', 'query') + + def contains(self, ldap_entry, attribute, value, ldap_config, company, + logger): + return (attribute in ldap_entry[1]) and \ + (value in ldap_entry[1][attribute]) + + def equals(self, ldap_entry, attribute, value, ldap_config, company, + logger): + return attribute in ldap_entry[1] and \ + unicode(value) == unicode(ldap_entry[1][attribute]) + + def query(self, ldap_entry, attribute, value, ldap_config, company, + logger): + query_string = Template(value).safe_substitute(dict( + [(attr, ldap_entry[1][attribute][0]) for attr in ldap_entry[1]] + ) + ) + logger.debug('evaluating query group mapping, filter: %s' % + query_string) + results = company.query(ldap_config, query_string) + logger.debug(results) + return bool(results) class CompanyLDAPGroupMapping(models.Model): @@ -33,19 +61,13 @@ class CompanyLDAPGroupMapping(models.Model): _order = 'ldap_attribute' def _get_operators(self): - operators = [] - members = inspect.getmembers( - users_ldap_groups_operators, - lambda cls: - inspect.isclass(cls) and - cls != users_ldap_groups_operators.LDAPOperator) - for name, operator in members: - operators.append((name, name)) + op_obj = self.env['res.company.ldap.operator'] + operators = [(op, op) for op in op_obj.operators()] return tuple(operators) ldap_id = fields.Many2one('res.company.ldap', 'LDAP server', required=True) ldap_attribute = fields.Char( - 'LDAP attribute', size=64, + 'LDAP attribute', help='The LDAP attribute to check.\n' 'For active directory, use memberOf.') operator = fields.Selection( @@ -53,7 +75,7 @@ def _get_operators(self): help='The operator to check the attribute against the value\n' 'For active directory, use \'contains\'', required=True) value = fields.Char( - 'Value', size=1024, + 'Value', help='The value to check the attribute against.\n' 'For active directory, use the dn of the desired group', required=True) @@ -81,6 +103,7 @@ class CompanyLDAP(models.Model): @api.model def get_or_create_user(self, conf, login, ldap_entry): + op_obj = self.env['res.company.ldap.operator'] id_ = conf['id'] this = self.browse(id_) user_id = super(CompanyLDAP, self).get_or_create_user( @@ -95,11 +118,10 @@ def get_or_create_user(self, conf, login, ldap_entry): user.write({'groups_id': [(5, )]}) for mapping in this.group_mappings: - operator = mapping.operator - operator = getattr(users_ldap_groups_operators, mapping.operator)() + operator = getattr(op_obj, mapping.operator) logger.debug('checking mapping %s' % mapping) - if operator.check_value(ldap_entry, mapping['ldap_attribute'], - mapping['value'], conf, self, logger): + if operator(ldap_entry, mapping['ldap_attribute'], + mapping['value'], conf, self, logger): logger.debug('adding user %d to group %s' % (user_id, mapping.group.name)) user.write({'groups_id': [(4, mapping.group.id)]}) diff --git a/users_ldap_groups/users_ldap_groups_operators.py b/users_ldap_groups/users_ldap_groups_operators.py deleted file mode 100644 index e4354a825a..0000000000 --- a/users_ldap_groups/users_ldap_groups_operators.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2012 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from string import Template - - -class LDAPOperator: - pass - - -class contains(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, - logger): - return (attribute in ldap_entry[1]) and \ - (value in ldap_entry[1][attribute]) - - -class equals(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, - logger): - return attribute in ldap_entry[1] and \ - unicode(value) == unicode(ldap_entry[1][attribute]) - - -class query(LDAPOperator): - def check_value(self, ldap_entry, attribute, value, ldap_config, company, - logger): - query_string = Template(value).safe_substitute(dict( - [(attr, ldap_entry[1][attribute][0]) for attr in ldap_entry[1]] - ) - ) - logger.debug('evaluating query group mapping, filter: %s' % - query_string) - results = company.query(ldap_config, query_string) - logger.debug(results) - return bool(results) From e77e2252fdab7221ea90edc170b6e73c426a6919 Mon Sep 17 00:00:00 2001 From: Giacomo Spettoli Date: Fri, 17 Jul 2015 15:12:52 +0200 Subject: [PATCH 11/29] use AbstractModel instead of TransientModel so we don't create useless db tables --- users_ldap_groups/users_ldap_groups.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py index b99ae0feaa..4d08d8aafe 100644 --- a/users_ldap_groups/users_ldap_groups.py +++ b/users_ldap_groups/users_ldap_groups.py @@ -26,7 +26,7 @@ from string import Template -class LDAPOperator(models.TransientModel): +class LDAPOperator(models.AbstractModel): _name = "res.company.ldap.operator" def operators(self): From ea0ac05c0b7cc52e0b1ea98a9add2a786bad808d Mon Sep 17 00:00:00 2001 From: Giacomo Spettoli Date: Fri, 17 Jul 2015 15:13:33 +0200 Subject: [PATCH 12/29] change description with summary to have the following sentence show up beneath the module's name in kanban view --- users_ldap_groups/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py index 6014447dc8..39ca3893c0 100644 --- a/users_ldap_groups/__openerp__.py +++ b/users_ldap_groups/__openerp__.py @@ -25,7 +25,7 @@ "depends": ["auth_ldap"], "author": "Therp BV,Odoo Community Association (OCA)", "license": "AGPL-3", - "description": """ + "summary": """ Adds user accounts to groups based on rules defined by the administrator. """, "category": "Tools", From 031274e89efa55b0fc538a305f6c370248d2905c Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Tue, 18 Aug 2015 10:47:52 +0200 Subject: [PATCH 13/29] Add missing default oca icons --- users_ldap_groups/i18n/de.po | 123 +++++++++++++++++ users_ldap_groups/i18n/es.po | 123 +++++++++++++++++ users_ldap_groups/i18n/fr.po | 123 +++++++++++++++++ users_ldap_groups/i18n/pt_BR.po | 124 ++++++++++++++++++ users_ldap_groups/i18n/sl.po | 124 ++++++++++++++++++ users_ldap_groups/static/description/icon.png | Bin 0 -> 9455 bytes 6 files changed, 617 insertions(+) create mode 100644 users_ldap_groups/i18n/de.po create mode 100644 users_ldap_groups/i18n/es.po create mode 100644 users_ldap_groups/i18n/fr.po create mode 100644 users_ldap_groups/i18n/pt_BR.po create mode 100644 users_ldap_groups/i18n/sl.po create mode 100644 users_ldap_groups/static/description/icon.png diff --git a/users_ldap_groups/i18n/de.po b/users_ldap_groups/i18n/de.po new file mode 100644 index 0000000000..bca5de7b86 --- /dev/null +++ b/users_ldap_groups/i18n/de.po @@ -0,0 +1,123 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-18 13:56+0000\n" +"Last-Translator: <>\n" +"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_uid:0 +msgid "Created by" +msgstr "Erstellt von" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_date:0 +msgid "Created on" +msgstr "Erstellt am:" + +#. module: users_ldap_groups +#: help:res.company.ldap,group_mappings:0 +msgid "Define how OpenERP groups are assigned to ldap users" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap,group_mappings:0 +msgid "Group mappings" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,id:0 +#: field:res.company.ldap.operator,id:0 +msgid "ID" +msgstr "ID" + +#. module: users_ldap_groups +#: help:res.company.ldap,only_ldap_groups:0 +msgid "" +"If this is checked, manual changes to group membership are undone on every " +"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"manually added groups are preserved." +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "LDAP attribute" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_id:0 +msgid "LDAP server" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_uid:0 +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert von" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_date:0 +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: users_ldap_groups +#: view:res.company:users_ldap_groups.company_form_view +msgid "Map User Groups" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap,only_ldap_groups:0 +msgid "Only ldap groups" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,group:0 +msgid "OpenERP group" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,operator:0 +msgid "Operator" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "" +"The LDAP attribute to check.\n" +"For active directory, use memberOf." +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,group:0 +msgid "The OpenERP group to assign" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,operator:0 +msgid "" +"The operator to check the attribute against the value\n" +"For active directory, use 'contains'" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,value:0 +msgid "" +"The value to check the attribute against.\n" +"For active directory, use the dn of the desired group" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,value:0 +msgid "Value" +msgstr "" diff --git a/users_ldap_groups/i18n/es.po b/users_ldap_groups/i18n/es.po new file mode 100644 index 0000000000..44858377bc --- /dev/null +++ b/users_ldap_groups/i18n/es.po @@ -0,0 +1,123 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-18 13:56+0000\n" +"Last-Translator: <>\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_uid:0 +msgid "Created by" +msgstr "Creado por" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_date:0 +msgid "Created on" +msgstr "Creado en" + +#. module: users_ldap_groups +#: help:res.company.ldap,group_mappings:0 +msgid "Define how OpenERP groups are assigned to ldap users" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap,group_mappings:0 +msgid "Group mappings" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,id:0 +#: field:res.company.ldap.operator,id:0 +msgid "ID" +msgstr "ID" + +#. module: users_ldap_groups +#: help:res.company.ldap,only_ldap_groups:0 +msgid "" +"If this is checked, manual changes to group membership are undone on every " +"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"manually added groups are preserved." +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "LDAP attribute" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_id:0 +msgid "LDAP server" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_uid:0 +msgid "Last Updated by" +msgstr "Última actualización de" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_date:0 +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: users_ldap_groups +#: view:res.company:users_ldap_groups.company_form_view +msgid "Map User Groups" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap,only_ldap_groups:0 +msgid "Only ldap groups" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,group:0 +msgid "OpenERP group" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,operator:0 +msgid "Operator" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "" +"The LDAP attribute to check.\n" +"For active directory, use memberOf." +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,group:0 +msgid "The OpenERP group to assign" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,operator:0 +msgid "" +"The operator to check the attribute against the value\n" +"For active directory, use 'contains'" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,value:0 +msgid "" +"The value to check the attribute against.\n" +"For active directory, use the dn of the desired group" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,value:0 +msgid "Value" +msgstr "" diff --git a/users_ldap_groups/i18n/fr.po b/users_ldap_groups/i18n/fr.po new file mode 100644 index 0000000000..57b8efe593 --- /dev/null +++ b/users_ldap_groups/i18n/fr.po @@ -0,0 +1,123 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_groups +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-18 13:56+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_uid:0 +msgid "Created by" +msgstr "Créé par" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_date:0 +msgid "Created on" +msgstr "Créé le" + +#. module: users_ldap_groups +#: help:res.company.ldap,group_mappings:0 +msgid "Define how OpenERP groups are assigned to ldap users" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap,group_mappings:0 +msgid "Group mappings" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,id:0 +#: field:res.company.ldap.operator,id:0 +msgid "ID" +msgstr "ID" + +#. module: users_ldap_groups +#: help:res.company.ldap,only_ldap_groups:0 +msgid "" +"If this is checked, manual changes to group membership are undone on every " +"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"manually added groups are preserved." +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "LDAP attribute" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_id:0 +msgid "LDAP server" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_uid:0 +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_date:0 +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: users_ldap_groups +#: view:res.company:users_ldap_groups.company_form_view +msgid "Map User Groups" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap,only_ldap_groups:0 +msgid "Only ldap groups" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,group:0 +msgid "OpenERP group" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,operator:0 +msgid "Operator" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "" +"The LDAP attribute to check.\n" +"For active directory, use memberOf." +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,group:0 +msgid "The OpenERP group to assign" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,operator:0 +msgid "" +"The operator to check the attribute against the value\n" +"For active directory, use 'contains'" +msgstr "" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,value:0 +msgid "" +"The value to check the attribute against.\n" +"For active directory, use the dn of the desired group" +msgstr "" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,value:0 +msgid "Value" +msgstr "" diff --git a/users_ldap_groups/i18n/pt_BR.po b/users_ldap_groups/i18n/pt_BR.po new file mode 100644 index 0000000000..5e170aa9b6 --- /dev/null +++ b/users_ldap_groups/i18n/pt_BR.po @@ -0,0 +1,124 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_groups +# +# Translators: +# Armando Vulcano Junior , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-19 00:55+0000\n" +"Last-Translator: Armando Vulcano Junior \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_uid:0 +msgid "Created by" +msgstr "Criado por" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_date:0 +msgid "Created on" +msgstr "Criado em" + +#. module: users_ldap_groups +#: help:res.company.ldap,group_mappings:0 +msgid "Define how OpenERP groups are assigned to ldap users" +msgstr "Define como grupos OpenERP são aribuídos aos usuários ldap" + +#. module: users_ldap_groups +#: field:res.company.ldap,group_mappings:0 +msgid "Group mappings" +msgstr "Mapeamento de Grupos" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,id:0 +#: field:res.company.ldap.operator,id:0 +msgid "ID" +msgstr "Identificação" + +#. module: users_ldap_groups +#: help:res.company.ldap,only_ldap_groups:0 +msgid "" +"If this is checked, manual changes to group membership are undone on every " +"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"manually added groups are preserved." +msgstr "Se esta opção for marcada, as alterações manuais para participação no grupo são desfeitas em cada login (grupos para OpenERP estão sempre em sincronia com grupos LDAP). Se não, grupos adicionados manualmente serão preservados." + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "LDAP attribute" +msgstr "Atributo LDAP" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_id:0 +msgid "LDAP server" +msgstr "Servidor LDAP" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_uid:0 +msgid "Last Updated by" +msgstr "Última atualização por" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_date:0 +msgid "Last Updated on" +msgstr "Última atualização em" + +#. module: users_ldap_groups +#: view:res.company:users_ldap_groups.company_form_view +msgid "Map User Groups" +msgstr "Mapear Grupos de Usuários" + +#. module: users_ldap_groups +#: field:res.company.ldap,only_ldap_groups:0 +msgid "Only ldap groups" +msgstr "Apenas grupos ldap" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,group:0 +msgid "OpenERP group" +msgstr "Grupo OpenERP" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,operator:0 +msgid "Operator" +msgstr "Operador" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "" +"The LDAP attribute to check.\n" +"For active directory, use memberOf." +msgstr "O atributo LDAP para checar\nPara active directory, use memberOf." + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,group:0 +msgid "The OpenERP group to assign" +msgstr "Grupo OpenERP para atribuir" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,operator:0 +msgid "" +"The operator to check the attribute against the value\n" +"For active directory, use 'contains'" +msgstr "O operador para verificar o atributo contra o valor\nPara active directory, use 'contains' " + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,value:0 +msgid "" +"The value to check the attribute against.\n" +"For active directory, use the dn of the desired group" +msgstr "O valor para verificar contra o atributo\nPara active directory, use de dn do grupo desejado" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,value:0 +msgid "Value" +msgstr "Valor" diff --git a/users_ldap_groups/i18n/sl.po b/users_ldap_groups/i18n/sl.po new file mode 100644 index 0000000000..a8bf1480b9 --- /dev/null +++ b/users_ldap_groups/i18n/sl.po @@ -0,0 +1,124 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_groups +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: server-tools (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-29 11:14+0000\n" +"PO-Revision-Date: 2015-09-24 11:48+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_uid:0 +msgid "Created by" +msgstr "Ustvaril" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,create_date:0 +msgid "Created on" +msgstr "Ustvarjeno" + +#. module: users_ldap_groups +#: help:res.company.ldap,group_mappings:0 +msgid "Define how OpenERP groups are assigned to ldap users" +msgstr "Določi način dodeljevanja OpenERP skupin LDAP uporabnikom" + +#. module: users_ldap_groups +#: field:res.company.ldap,group_mappings:0 +msgid "Group mappings" +msgstr "Mapiranja skupin" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,id:0 +#: field:res.company.ldap.operator,id:0 +msgid "ID" +msgstr "ID" + +#. module: users_ldap_groups +#: help:res.company.ldap,only_ldap_groups:0 +msgid "" +"If this is checked, manual changes to group membership are undone on every " +"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"manually added groups are preserved." +msgstr "Če označeno, so vse ročne spremembe članov skupin prezrte ob vsaki prijavi (tako so OpenERP skupine vedno sinhrone z LDAP skupinami). Če ni, se ročno dodane skupine ohranijo." + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "LDAP attribute" +msgstr "LDAP atribut" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,ldap_id:0 +msgid "LDAP server" +msgstr "LDAP strežnik" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_uid:0 +msgid "Last Updated by" +msgstr "Zadnji posodobil" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,write_date:0 +msgid "Last Updated on" +msgstr "Zadnjič posodobljeno" + +#. module: users_ldap_groups +#: view:res.company:users_ldap_groups.company_form_view +msgid "Map User Groups" +msgstr "Mapiraj uporabniške skupine" + +#. module: users_ldap_groups +#: field:res.company.ldap,only_ldap_groups:0 +msgid "Only ldap groups" +msgstr "Samo LDAP skupine" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,group:0 +msgid "OpenERP group" +msgstr "OpenERP skupine" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,operator:0 +msgid "Operator" +msgstr "Operater" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,ldap_attribute:0 +msgid "" +"The LDAP attribute to check.\n" +"For active directory, use memberOf." +msgstr "LDAP atribut za preverjanje.\nZa aktivni imenik uporabite memberOf." + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,group:0 +msgid "The OpenERP group to assign" +msgstr "OpenERP skupina za dodelitev" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,operator:0 +msgid "" +"The operator to check the attribute against the value\n" +"For active directory, use 'contains'" +msgstr "Operater za primerjavo atributa z vrednostjo\nza aktivni imenik, uporabite 'contains'" + +#. module: users_ldap_groups +#: help:res.company.ldap.group_mapping,value:0 +msgid "" +"The value to check the attribute against.\n" +"For active directory, use the dn of the desired group" +msgstr "Vrednost za primerjavo atributa.\nZa aktivni imenik uporabite dn željene skupine" + +#. module: users_ldap_groups +#: field:res.company.ldap.group_mapping,value:0 +msgid "Value" +msgstr "Vrednost" diff --git a/users_ldap_groups/static/description/icon.png b/users_ldap_groups/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz# z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K= z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C zuVl&0duN<;uOsB3%T9Fp8t{ED108<+W(nOZd?gDnfNBC3>M8WE61$So|P zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1 zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_ zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8 zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ> zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD z#z-)AXwSRY?OPefw^iI+ z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$ z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6 zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+ z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC) zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x! zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8 z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n= z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@ zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y< zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6 zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6% z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(| z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6 z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d} z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 From 2896e3a92993df6d1a4b955fc759a4dcbabc0f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 9 Oct 2015 10:03:09 +0200 Subject: [PATCH 14/29] [UPD] prefix versions with 8.0 --- users_ldap_groups/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py index 39ca3893c0..453c396689 100644 --- a/users_ldap_groups/__openerp__.py +++ b/users_ldap_groups/__openerp__.py @@ -21,7 +21,7 @@ { "name": "Groups assignment", - "version": "1.2", + "version": "8.0.1.2.0", "depends": ["auth_ldap"], "author": "Therp BV,Odoo Community Association (OCA)", "license": "AGPL-3", From 65ebd0b44bd52d4a5904bf611830fb3be007973c Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 14 Oct 2015 02:53:59 +0200 Subject: [PATCH 15/29] [MIG] Make modules uninstallable --- users_ldap_groups/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__openerp__.py index 453c396689..34a14bbf77 100644 --- a/users_ldap_groups/__openerp__.py +++ b/users_ldap_groups/__openerp__.py @@ -33,7 +33,7 @@ 'users_ldap_groups.xml', 'security/ir.model.access.csv', ], - "installable": True, + 'installable': False, "external_dependencies": { 'python': ['ldap'], }, From 6093acb226630982d9ec3b775ef48236b89cc663 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 16:08:27 +0200 Subject: [PATCH 16/29] [MIG] Rename manifest files --- users_ldap_groups/{__openerp__.py => __manifest__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename users_ldap_groups/{__openerp__.py => __manifest__.py} (100%) diff --git a/users_ldap_groups/__openerp__.py b/users_ldap_groups/__manifest__.py similarity index 100% rename from users_ldap_groups/__openerp__.py rename to users_ldap_groups/__manifest__.py From 3536d0f829e7a5bf55fec177efc25a9e8971442c Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Mon, 5 Feb 2018 18:03:14 +0100 Subject: [PATCH 17/29] [MIG] users_ldap_groups --- users_ldap_groups/README.rst | 36 +++-- users_ldap_groups/__init__.py | 24 +--- users_ldap_groups/__manifest__.py | 38 ++---- users_ldap_groups/models/__init__.py | 7 + users_ldap_groups/models/res_company_ldap.py | 47 +++++++ .../models/res_company_ldap_group_mapping.py | 33 +++++ .../models/res_company_ldap_operator.py | 43 ++++++ users_ldap_groups/models/res_users.py | 27 ++++ users_ldap_groups/tests/__init__.py | 4 + .../tests/test_users_ldap_groups.py | 65 +++++++++ users_ldap_groups/users_ldap_groups.py | 128 ------------------ users_ldap_groups/users_ldap_groups.xml | 27 ---- .../views/base_config_settings.xml | 24 ++++ 13 files changed, 279 insertions(+), 224 deletions(-) create mode 100644 users_ldap_groups/models/__init__.py create mode 100644 users_ldap_groups/models/res_company_ldap.py create mode 100644 users_ldap_groups/models/res_company_ldap_group_mapping.py create mode 100644 users_ldap_groups/models/res_company_ldap_operator.py create mode 100644 users_ldap_groups/models/res_users.py create mode 100644 users_ldap_groups/tests/__init__.py create mode 100644 users_ldap_groups/tests/test_users_ldap_groups.py delete mode 100644 users_ldap_groups/users_ldap_groups.py delete mode 100644 users_ldap_groups/users_ldap_groups.xml create mode 100644 users_ldap_groups/views/base_config_settings.xml diff --git a/users_ldap_groups/README.rst b/users_ldap_groups/README.rst index 2dbc81de36..19c1eff636 100644 --- a/users_ldap_groups/README.rst +++ b/users_ldap_groups/README.rst @@ -1,34 +1,27 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg :alt: License: AGPL-3 -users_ldap_groups -================= +LDAP groups assignment +====================== Adds user accounts to groups based on rules defined by the administrator. - Usage ===== -Define mappings in Settings->Companies->[your company]->tab configuration->[ -your ldap server]. +Define mappings in Settings / General Settings / LDAP Parameters + +Decide whether you want only groups mapped from ldap (`Only ldap groups` checked) or a mix of manually set groups and ldap groups (`Only ldap groups` unchecked). Setting this to 'no' will result in users never losing privileges when you remove them from a ldap group, so that's a potential security issue. It is still the default to prevent losing group information by accident. -Decide whether you want only groups mapped from ldap (Only ldap groups=y) or a -mix of manually set groups and ldap groups (Only ldap groups=n). Setting this -to 'no' will result in users never losing privileges when you remove them from -a ldap group, so that's a potential security issue. It is still the default to -prevent losing group information by accident. +For active directory, use LDAP attribute 'memberOf' and operator 'contains'. Fill in the DN of the windows group as value and choose an Odoo group users with this windows group are to be assigned to. -For active directory, use LDAP attribute 'memberOf' and operator 'contains'. -Fill in the DN of the windows group as value and choose an OpenERP group users -with this windows group are to be assigned to. +For posix accounts, use operator 'query' and a value like:: -For posix accounts, use operator 'query' and a value like -(&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid)) + (&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid)) The operator query matches if the filter in value returns something, and value -can contain $[attribute] which will be replaced by the first value of the -user's ldap record's attribute named [attribute]. +can contain ``$attribute`` which will be replaced by the first value of the +user's ldap record's attribute named `attribute`. Bug Tracker =========== @@ -42,10 +35,15 @@ If you spotted it first, help us smashing it by providing a detailed and welcome Credits ======= +Images +------ + +* Odoo Community Association: `Icon `_. + Contributors ------------ -* Therp BV +* Holger Brunn * Giacomo Spettoli Maintainer @@ -61,4 +59,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/users_ldap_groups/__init__.py b/users_ldap_groups/__init__.py index d1066f41bf..7517825865 100644 --- a/users_ldap_groups/__init__.py +++ b/users_ldap_groups/__init__.py @@ -1,22 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2012 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from . import users_ldap_groups +# Copyright 2012-2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from . import models diff --git a/users_ldap_groups/__manifest__.py b/users_ldap_groups/__manifest__.py index 34a14bbf77..16dcb1b6d7 100644 --- a/users_ldap_groups/__manifest__.py +++ b/users_ldap_groups/__manifest__.py @@ -1,39 +1,19 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2012 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - +# Copyright 2012-2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - "name": "Groups assignment", - "version": "8.0.1.2.0", + "name": "LDAP groups assignment", + "version": "10.0.0.0.0", "depends": ["auth_ldap"], - "author": "Therp BV,Odoo Community Association (OCA)", + "author": "Therp BV, Odoo Community Association (OCA)", "license": "AGPL-3", - "summary": """ -Adds user accounts to groups based on rules defined by the administrator. -""", - "category": "Tools", + "summary": "Adds user accounts to groups based on rules defined " + "by the administrator.", + "category": "Authentication", "data": [ - 'users_ldap_groups.xml', + 'views/base_config_settings.xml', 'security/ir.model.access.csv', ], - 'installable': False, "external_dependencies": { 'python': ['ldap'], }, diff --git a/users_ldap_groups/models/__init__.py b/users_ldap_groups/models/__init__.py new file mode 100644 index 0000000000..9adbf06b70 --- /dev/null +++ b/users_ldap_groups/models/__init__.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# Copyright 2012-2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from . import res_company_ldap +from . import res_company_ldap_operator +from . import res_company_ldap_group_mapping +from . import res_users diff --git a/users_ldap_groups/models/res_company_ldap.py b/users_ldap_groups/models/res_company_ldap.py new file mode 100644 index 0000000000..800446fd8d --- /dev/null +++ b/users_ldap_groups/models/res_company_ldap.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# Copyright 2012-2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from logging import getLogger +from odoo import api, fields, models +_logger = getLogger(__name__) + + +class ResCompanyLdap(models.Model): + _inherit = 'res.company.ldap' + + group_mapping_ids = fields.One2many( + 'res.company.ldap.group_mapping', + 'ldap_id', 'Group mappings', + help='Define how Odoo groups are assigned to ldap users', + ) + only_ldap_groups = fields.Boolean( + 'Only ldap groups', default=False, + help='If this is checked, manual changes to group membership are ' + 'undone on every login (so Odoo groups are always synchronous ' + 'with LDAP groups). If not, manually added groups are preserved.', + ) + + @api.model + def get_or_create_user(self, conf, login, ldap_entry): + op_obj = self.env['res.company.ldap.operator'] + user_id = super(ResCompanyLdap, self).get_or_create_user( + conf, login, ldap_entry + ) + if not user_id: + return user_id + this = self.browse(conf['id']) + user = self.env['res.users'].browse(user_id) + if this.only_ldap_groups: + _logger.debug('deleting all groups from user %d', user_id) + user.write({'groups_id': [(5, False, False)]}) + + for mapping in this.group_mapping_ids: + operator = getattr(op_obj, mapping.operator) + _logger.debug('checking mapping %s', mapping) + + if operator(ldap_entry, mapping): + _logger.debug( + 'adding user %d to group %s', user, mapping.group_id.name, + ) + user.write({'groups_id': [(4, mapping.group_id.id)]}) + return user_id diff --git a/users_ldap_groups/models/res_company_ldap_group_mapping.py b/users_ldap_groups/models/res_company_ldap_group_mapping.py new file mode 100644 index 0000000000..e78faed192 --- /dev/null +++ b/users_ldap_groups/models/res_company_ldap_group_mapping.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# © 2012-2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import fields, models + + +class ResCompanyLdapGroupMapping(models.Model): + _name = 'res.company.ldap.group_mapping' + _rec_name = 'ldap_attribute' + _order = 'ldap_attribute' + + ldap_id = fields.Many2one( + 'res.company.ldap', 'LDAP server', required=True, ondelete='cascade', + ) + ldap_attribute = fields.Char( + 'LDAP attribute', + help='The LDAP attribute to check.\n' + 'For active directory, use memberOf.') + operator = fields.Selection( + lambda self: [ + (o, o) for o in self.env['res.company.ldap.operator'].operators() + ], + 'Operator', + help='The operator to check the attribute against the value\n' + 'For active directory, use \'contains\'', required=True) + value = fields.Char( + 'Value', + help='The value to check the attribute against.\n' + 'For active directory, use the dn of the desired group', + required=True) + group_id = fields.Many2one( + 'res.groups', 'Odoo group', oldname='group', + help='The Odoo group to assign', required=True) diff --git a/users_ldap_groups/models/res_company_ldap_operator.py b/users_ldap_groups/models/res_company_ldap_operator.py new file mode 100644 index 0000000000..7dbd46f6ce --- /dev/null +++ b/users_ldap_groups/models/res_company_ldap_operator.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# © 2012-2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from logging import getLogger +from odoo import api, models +from string import Template +_logger = getLogger(__name__) + + +class ResCompanyLdapOperator(models.AbstractModel): + """Define operators for group mappings""" + + _name = "res.company.ldap.operator" + _description = "Definition op LDAP operations" + + @api.model + def operators(self): + """Return names of function to call on this model as operator""" + return ('contains', 'equals', 'query') + + @api.model + def contains(self, ldap_entry, mapping): + return mapping.ldap_attribute in ldap_entry[1] and \ + mapping.value in ldap_entry[1][mapping.ldap_attribute] + + def equals(self, ldap_entry, mapping): + return mapping.ldap_attribute in ldap_entry[1] and \ + unicode(mapping.value) == unicode( + ldap_entry[1][mapping.ldap_attribute] + ) + + def query(self, ldap_entry, mapping): + query_string = Template(mapping.value).safe_substitute({ + attr: ldap_entry[1][attr][0] for attr in ldap_entry[1] + }) + _logger.debug( + 'evaluating query group mapping, filter: %s' % query_string + ) + results = mapping.ldap_id.query( + mapping.ldap_id.read()[0], query_string + ) + _logger.debug(results) + return bool(results) diff --git a/users_ldap_groups/models/res_users.py b/users_ldap_groups/models/res_users.py new file mode 100644 index 0000000000..ac75d73db2 --- /dev/null +++ b/users_ldap_groups/models/res_users.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# © 2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import SUPERUSER_ID, api, models, registry + + +class ResUsers(models.Model): + _inherit = 'res.users' + + @classmethod + def _login(cls, db, login, password): + user_id = super(ResUsers, cls)._login(db, login, password) + if not user_id: + return user_id + with registry(db).cursor() as cr: + env = api.Environment(cr, SUPERUSER_ID, {}) + user = env['res.users'].browse(user_id) + # check if this user came from ldap, rerun get_or_create_user in + # this case to apply ldap groups if necessary + ldaps = user.company_id.ldaps + if user.active and any(ldaps.mapped('only_ldap_groups')): + for conf in ldaps.get_ldap_dicts(): + entry = ldaps.authenticate(conf, login, password) + if entry: + ldaps.get_or_create_user(conf, login, entry) + break + return user_id diff --git a/users_ldap_groups/tests/__init__.py b/users_ldap_groups/tests/__init__.py new file mode 100644 index 0000000000..be1aab57a7 --- /dev/null +++ b/users_ldap_groups/tests/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from . import test_users_ldap_groups diff --git a/users_ldap_groups/tests/test_users_ldap_groups.py b/users_ldap_groups/tests/test_users_ldap_groups.py new file mode 100644 index 0000000000..0f6dbecf5c --- /dev/null +++ b/users_ldap_groups/tests/test_users_ldap_groups.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Therp BV +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from mock import Mock, patch +from odoo.tests.common import TransactionCase + + +@patch('ldap.initialize', return_value=Mock( + search_st=Mock(return_value=[ + ('cn=hello', {'name': ['hello', 'hello2']}) + ]), +)) +class TestUsersLdapGroups(TransactionCase): + def test_users_ldap_groups(self, ldap_initialize): + # _login does its work in a new cursor, so we need one too + with self.env.registry.cursor() as cr: + env = self.env(cr=cr) + group_contains = env['res.groups'].create({'name': 'contains'}) + group_equals = env['res.groups'].create({'name': 'equals'}) + group_query = env['res.groups'].create({'name': 'query'}) + env.ref('base.main_company').write({'ldaps': [(0, 0, { + 'ldap_server': 'localhost', + 'ldap_filter': '(&(objectClass=*),(uid=%s))', + 'ldap_base': 'base', + 'only_ldap_groups': True, + 'group_mapping_ids': [ + (0, 0, { + 'ldap_attribute': 'name', + 'operator': 'contains', + 'value': 'hello3', + 'group_id': env.ref('base.group_system').id, + }), + (0, 0, { + 'ldap_attribute': 'name', + 'operator': 'contains', + 'value': 'hello2', + 'group_id': group_contains.id, + }), + (0, 0, { + 'ldap_attribute': 'name', + 'operator': 'equals', + 'value': 'hello', + 'group_id': group_equals.id, + }), + (0, 0, { + 'ldap_attribute': '', + 'operator': 'query', + 'value': 'is not run because of patching', + 'group_id': group_query.id, + }), + ], + })]}) + + self.env['res.users']._login(self.env.cr.dbname, 'demo', 'wrong') + with self.env.registry.cursor() as cr: + env = self.env(cr=cr) + demo_user = env.ref('base.user_demo') + # this asserts group mappings from demo data + groups = demo_user.groups_id + self.assertIn(group_contains, groups) + self.assertNotIn(group_equals, groups) + self.assertIn(group_query, groups) + self.assertNotIn(env.ref('base.group_system'), groups) + # clean up + env.ref('base.main_company').write({'ldaps': [(6, False, [])]}) diff --git a/users_ldap_groups/users_ldap_groups.py b/users_ldap_groups/users_ldap_groups.py deleted file mode 100644 index 4d08d8aafe..0000000000 --- a/users_ldap_groups/users_ldap_groups.py +++ /dev/null @@ -1,128 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2012 Therp BV (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp import models -from openerp import fields -from openerp import api -import logging -from string import Template - - -class LDAPOperator(models.AbstractModel): - _name = "res.company.ldap.operator" - - def operators(self): - return ('contains', 'equals', 'query') - - def contains(self, ldap_entry, attribute, value, ldap_config, company, - logger): - return (attribute in ldap_entry[1]) and \ - (value in ldap_entry[1][attribute]) - - def equals(self, ldap_entry, attribute, value, ldap_config, company, - logger): - return attribute in ldap_entry[1] and \ - unicode(value) == unicode(ldap_entry[1][attribute]) - - def query(self, ldap_entry, attribute, value, ldap_config, company, - logger): - query_string = Template(value).safe_substitute(dict( - [(attr, ldap_entry[1][attribute][0]) for attr in ldap_entry[1]] - ) - ) - logger.debug('evaluating query group mapping, filter: %s' % - query_string) - results = company.query(ldap_config, query_string) - logger.debug(results) - return bool(results) - - -class CompanyLDAPGroupMapping(models.Model): - _name = 'res.company.ldap.group_mapping' - _rec_name = 'ldap_attribute' - _order = 'ldap_attribute' - - def _get_operators(self): - op_obj = self.env['res.company.ldap.operator'] - operators = [(op, op) for op in op_obj.operators()] - return tuple(operators) - - ldap_id = fields.Many2one('res.company.ldap', 'LDAP server', required=True) - ldap_attribute = fields.Char( - 'LDAP attribute', - help='The LDAP attribute to check.\n' - 'For active directory, use memberOf.') - operator = fields.Selection( - _get_operators, 'Operator', - help='The operator to check the attribute against the value\n' - 'For active directory, use \'contains\'', required=True) - value = fields.Char( - 'Value', - help='The value to check the attribute against.\n' - 'For active directory, use the dn of the desired group', - required=True) - group = fields.Many2one( - 'res.groups', 'OpenERP group', - help='The OpenERP group to assign', required=True) - - -class CompanyLDAP(models.Model): - _inherit = 'res.company.ldap' - - group_mappings = fields.One2many( - 'res.company.ldap.group_mapping', - 'ldap_id', 'Group mappings', - help='Define how OpenERP groups are assigned to ldap users') - only_ldap_groups = fields.Boolean( - 'Only ldap groups', - help='If this is checked, manual changes to group membership are ' - 'undone on every login (so OpenERP groups are always synchronous ' - 'with LDAP groups). If not, manually added groups are preserved.') - - _default = { - 'only_ldap_groups': False, - } - - @api.model - def get_or_create_user(self, conf, login, ldap_entry): - op_obj = self.env['res.company.ldap.operator'] - id_ = conf['id'] - this = self.browse(id_) - user_id = super(CompanyLDAP, self).get_or_create_user( - conf, login, ldap_entry) - if not user_id: - return user_id - userobj = self.env['res.users'] - user = userobj.browse(user_id) - logger = logging.getLogger('users_ldap_groups') - if self.only_ldap_groups: - logger.debug('deleting all groups from user %d' % user_id) - user.write({'groups_id': [(5, )]}) - - for mapping in this.group_mappings: - operator = getattr(op_obj, mapping.operator) - logger.debug('checking mapping %s' % mapping) - if operator(ldap_entry, mapping['ldap_attribute'], - mapping['value'], conf, self, logger): - logger.debug('adding user %d to group %s' % - (user_id, mapping.group.name)) - user.write({'groups_id': [(4, mapping.group.id)]}) - return user_id diff --git a/users_ldap_groups/users_ldap_groups.xml b/users_ldap_groups/users_ldap_groups.xml deleted file mode 100644 index cee402bff1..0000000000 --- a/users_ldap_groups/users_ldap_groups.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - res.company.form.inherit.users_ldap_groups - res.company - - - - - - - - - - - - - - - - - - - - - diff --git a/users_ldap_groups/views/base_config_settings.xml b/users_ldap_groups/views/base_config_settings.xml new file mode 100644 index 0000000000..7a0ada56a1 --- /dev/null +++ b/users_ldap_groups/views/base_config_settings.xml @@ -0,0 +1,24 @@ + + + + base.config.settings + + + + + + + + + + + From e70859da2c00583ef35cce5a86d03ef6035d47e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Fri, 15 Jun 2018 23:42:14 +0200 Subject: [PATCH 18/29] remove obsolete .pot files [ci skip] --- users_ldap_groups/i18n/de.po | 90 ++++++++---- users_ldap_groups/i18n/es.po | 90 ++++++++---- users_ldap_groups/i18n/fr.po | 90 ++++++++---- users_ldap_groups/i18n/pt_BR.po | 116 +++++++++++----- users_ldap_groups/i18n/sl.po | 119 +++++++++++----- users_ldap_groups/i18n/users_ldap_groups.pot | 138 ++++++++++++++++++- 6 files changed, 488 insertions(+), 155 deletions(-) diff --git a/users_ldap_groups/i18n/de.po b/users_ldap_groups/i18n/de.po index bca5de7b86..6299f129bc 100644 --- a/users_ldap_groups/i18n/de.po +++ b/users_ldap_groups/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * users_ldap_groups -# +# # Translators: msgid "" msgstr "" @@ -10,114 +10,148 @@ msgstr "" "POT-Creation-Date: 2015-09-29 11:14+0000\n" "PO-Revision-Date: 2015-09-18 13:56+0000\n" "Last-Translator: <>\n" -"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-8-0/language/de/)\n" +"Language-Team: German (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid msgid "Created by" msgstr "Erstellt von" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date msgid "Created on" msgstr "Erstellt am:" #. module: users_ldap_groups -#: help:res.company.ldap,group_mappings:0 -msgid "Define how OpenERP groups are assigned to ldap users" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +msgid "Define how Odoo groups are assigned to ldap users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator +msgid "Definition op LDAP operations" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap,group_mappings:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +msgid "Display Name" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids msgid "Group mappings" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,id:0 -#: field:res.company.ldap.operator,id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: help:res.company.ldap,only_ldap_groups:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups msgid "" "If this is checked, manual changes to group membership are undone on every " -"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "LDAP attribute" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id msgid "LDAP server" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#, fuzzy +msgid "Last Modified on" +msgstr "Zuletzt aktualisiert am" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid msgid "Last Updated by" msgstr "Zuletzt aktualisiert von" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date msgid "Last Updated on" msgstr "Zuletzt aktualisiert am" #. module: users_ldap_groups -#: view:res.company:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view msgid "Map User Groups" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap,only_ldap_groups:0 -msgid "Only ldap groups" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "Odoo group" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,group:0 -msgid "OpenERP group" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "Only ldap groups" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "Operator" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,group:0 -msgid "The OpenERP group to assign" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "The Odoo group to assign" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,value:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,value:0 +#: model:ir.model,name:users_ldap_groups.model_res_users +msgid "Users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "Value" msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "res.company.ldap" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "res.company.ldap.group_mapping" +msgstr "" diff --git a/users_ldap_groups/i18n/es.po b/users_ldap_groups/i18n/es.po index 44858377bc..5865ee6c4f 100644 --- a/users_ldap_groups/i18n/es.po +++ b/users_ldap_groups/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * users_ldap_groups -# +# # Translators: msgid "" msgstr "" @@ -10,114 +10,148 @@ msgstr "" "POT-Creation-Date: 2015-09-29 11:14+0000\n" "PO-Revision-Date: 2015-09-18 13:56+0000\n" "Last-Translator: <>\n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-8-0/language/es/)\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid msgid "Created by" msgstr "Creado por" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date msgid "Created on" msgstr "Creado en" #. module: users_ldap_groups -#: help:res.company.ldap,group_mappings:0 -msgid "Define how OpenERP groups are assigned to ldap users" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +msgid "Define how Odoo groups are assigned to ldap users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator +msgid "Definition op LDAP operations" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap,group_mappings:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +msgid "Display Name" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids msgid "Group mappings" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,id:0 -#: field:res.company.ldap.operator,id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: help:res.company.ldap,only_ldap_groups:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups msgid "" "If this is checked, manual changes to group membership are undone on every " -"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "LDAP attribute" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id msgid "LDAP server" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#, fuzzy +msgid "Last Modified on" +msgstr "Última actualización en" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid msgid "Last Updated by" msgstr "Última actualización de" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date msgid "Last Updated on" msgstr "Última actualización en" #. module: users_ldap_groups -#: view:res.company:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view msgid "Map User Groups" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap,only_ldap_groups:0 -msgid "Only ldap groups" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "Odoo group" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,group:0 -msgid "OpenERP group" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "Only ldap groups" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "Operator" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,group:0 -msgid "The OpenERP group to assign" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "The Odoo group to assign" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,value:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,value:0 +#: model:ir.model,name:users_ldap_groups.model_res_users +msgid "Users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "Value" msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "res.company.ldap" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "res.company.ldap.group_mapping" +msgstr "" diff --git a/users_ldap_groups/i18n/fr.po b/users_ldap_groups/i18n/fr.po index 57b8efe593..6ed8c3d9af 100644 --- a/users_ldap_groups/i18n/fr.po +++ b/users_ldap_groups/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * users_ldap_groups -# +# # Translators: msgid "" msgstr "" @@ -10,114 +10,148 @@ msgstr "" "POT-Creation-Date: 2015-09-29 11:14+0000\n" "PO-Revision-Date: 2015-09-18 13:56+0000\n" "Last-Translator: <>\n" -"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-8-0/language/fr/)\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/fr/)\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid msgid "Created by" msgstr "Créé par" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date msgid "Created on" msgstr "Créé le" #. module: users_ldap_groups -#: help:res.company.ldap,group_mappings:0 -msgid "Define how OpenERP groups are assigned to ldap users" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +msgid "Define how Odoo groups are assigned to ldap users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator +msgid "Definition op LDAP operations" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap,group_mappings:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +msgid "Display Name" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids msgid "Group mappings" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,id:0 -#: field:res.company.ldap.operator,id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: help:res.company.ldap,only_ldap_groups:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups msgid "" "If this is checked, manual changes to group membership are undone on every " -"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "LDAP attribute" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id msgid "LDAP server" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#, fuzzy +msgid "Last Modified on" +msgstr "Dernière mise à jour le" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid msgid "Last Updated by" msgstr "Dernière mise à jour par" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date msgid "Last Updated on" msgstr "Dernière mise à jour le" #. module: users_ldap_groups -#: view:res.company:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view msgid "Map User Groups" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap,only_ldap_groups:0 -msgid "Only ldap groups" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "Odoo group" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,group:0 -msgid "OpenERP group" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "Only ldap groups" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "Operator" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,group:0 -msgid "The OpenERP group to assign" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "The Odoo group to assign" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" msgstr "" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,value:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,value:0 +#: model:ir.model,name:users_ldap_groups.model_res_users +msgid "Users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "Value" msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "res.company.ldap" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "res.company.ldap.group_mapping" +msgstr "" diff --git a/users_ldap_groups/i18n/pt_BR.po b/users_ldap_groups/i18n/pt_BR.po index 5e170aa9b6..77261f254b 100644 --- a/users_ldap_groups/i18n/pt_BR.po +++ b/users_ldap_groups/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * users_ldap_groups -# +# # Translators: # Armando Vulcano Junior , 2015 msgid "" @@ -11,114 +11,164 @@ msgstr "" "POT-Creation-Date: 2015-09-29 11:14+0000\n" "PO-Revision-Date: 2015-09-19 00:55+0000\n" "Last-Translator: Armando Vulcano Junior \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-tools-8-0/language/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-" +"tools-8-0/language/pt_BR/)\n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid msgid "Created by" msgstr "Criado por" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date msgid "Created on" msgstr "Criado em" #. module: users_ldap_groups -#: help:res.company.ldap,group_mappings:0 -msgid "Define how OpenERP groups are assigned to ldap users" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#, fuzzy +msgid "Define how Odoo groups are assigned to ldap users" msgstr "Define como grupos OpenERP são aribuídos aos usuários ldap" #. module: users_ldap_groups -#: field:res.company.ldap,group_mappings:0 +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator +msgid "Definition op LDAP operations" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +msgid "Display Name" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids msgid "Group mappings" msgstr "Mapeamento de Grupos" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,id:0 -#: field:res.company.ldap.operator,id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id msgid "ID" msgstr "Identificação" #. module: users_ldap_groups -#: help:res.company.ldap,only_ldap_groups:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#, fuzzy msgid "" "If this is checked, manual changes to group membership are undone on every " -"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." -msgstr "Se esta opção for marcada, as alterações manuais para participação no grupo são desfeitas em cada login (grupos para OpenERP estão sempre em sincronia com grupos LDAP). Se não, grupos adicionados manualmente serão preservados." +msgstr "" +"Se esta opção for marcada, as alterações manuais para participação no grupo " +"são desfeitas em cada login (grupos para OpenERP estão sempre em sincronia " +"com grupos LDAP). Se não, grupos adicionados manualmente serão preservados." #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "LDAP attribute" msgstr "Atributo LDAP" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id msgid "LDAP server" msgstr "Servidor LDAP" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#, fuzzy +msgid "Last Modified on" +msgstr "Última atualização em" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid msgid "Last Updated by" msgstr "Última atualização por" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date msgid "Last Updated on" msgstr "Última atualização em" #. module: users_ldap_groups -#: view:res.company:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view msgid "Map User Groups" msgstr "Mapear Grupos de Usuários" #. module: users_ldap_groups -#: field:res.company.ldap,only_ldap_groups:0 -msgid "Only ldap groups" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#, fuzzy +msgid "Odoo group" msgstr "Apenas grupos ldap" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,group:0 -msgid "OpenERP group" -msgstr "Grupo OpenERP" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "Only ldap groups" +msgstr "Apenas grupos ldap" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "Operator" msgstr "Operador" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." -msgstr "O atributo LDAP para checar\nPara active directory, use memberOf." +msgstr "" +"O atributo LDAP para checar\n" +"Para active directory, use memberOf." #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,group:0 -msgid "The OpenERP group to assign" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#, fuzzy +msgid "The Odoo group to assign" msgstr "Grupo OpenERP para atribuir" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" -msgstr "O operador para verificar o atributo contra o valor\nPara active directory, use 'contains' " +msgstr "" +"O operador para verificar o atributo contra o valor\n" +"Para active directory, use 'contains' " #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,value:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" -msgstr "O valor para verificar contra o atributo\nPara active directory, use de dn do grupo desejado" +msgstr "" +"O valor para verificar contra o atributo\n" +"Para active directory, use de dn do grupo desejado" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_users +msgid "Users" +msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,value:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "Value" msgstr "Valor" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "res.company.ldap" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "res.company.ldap.group_mapping" +msgstr "" + +#~ msgid "OpenERP group" +#~ msgstr "Grupo OpenERP" diff --git a/users_ldap_groups/i18n/sl.po b/users_ldap_groups/i18n/sl.po index a8bf1480b9..2c39707f46 100644 --- a/users_ldap_groups/i18n/sl.po +++ b/users_ldap_groups/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * users_ldap_groups -# +# # Translators: # Matjaž Mozetič , 2015 msgid "" @@ -11,114 +11,165 @@ msgstr "" "POT-Creation-Date: 2015-09-29 11:14+0000\n" "PO-Revision-Date: 2015-09-24 11:48+0000\n" "Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-0/language/sl/)\n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-0/" +"language/sl/)\n" +"Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid msgid "Created by" msgstr "Ustvaril" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,create_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date msgid "Created on" msgstr "Ustvarjeno" #. module: users_ldap_groups -#: help:res.company.ldap,group_mappings:0 -msgid "Define how OpenERP groups are assigned to ldap users" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#, fuzzy +msgid "Define how Odoo groups are assigned to ldap users" msgstr "Določi način dodeljevanja OpenERP skupin LDAP uporabnikom" #. module: users_ldap_groups -#: field:res.company.ldap,group_mappings:0 +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator +msgid "Definition op LDAP operations" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +msgid "Display Name" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids msgid "Group mappings" msgstr "Mapiranja skupin" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,id:0 -#: field:res.company.ldap.operator,id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: help:res.company.ldap,only_ldap_groups:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#, fuzzy msgid "" "If this is checked, manual changes to group membership are undone on every " -"login (so OpenERP groups are always synchronous with LDAP groups). If not, " +"login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." -msgstr "Če označeno, so vse ročne spremembe članov skupin prezrte ob vsaki prijavi (tako so OpenERP skupine vedno sinhrone z LDAP skupinami). Če ni, se ročno dodane skupine ohranijo." +msgstr "" +"Če označeno, so vse ročne spremembe članov skupin prezrte ob vsaki prijavi " +"(tako so OpenERP skupine vedno sinhrone z LDAP skupinami). Če ni, se ročno " +"dodane skupine ohranijo." #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "LDAP attribute" msgstr "LDAP atribut" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,ldap_id:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id msgid "LDAP server" msgstr "LDAP strežnik" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_uid:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#, fuzzy +msgid "Last Modified on" +msgstr "Zadnjič posodobljeno" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid msgid "Last Updated by" msgstr "Zadnji posodobil" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,write_date:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date msgid "Last Updated on" msgstr "Zadnjič posodobljeno" #. module: users_ldap_groups -#: view:res.company:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view msgid "Map User Groups" msgstr "Mapiraj uporabniške skupine" #. module: users_ldap_groups -#: field:res.company.ldap,only_ldap_groups:0 -msgid "Only ldap groups" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#, fuzzy +msgid "Odoo group" msgstr "Samo LDAP skupine" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,group:0 -msgid "OpenERP group" -msgstr "OpenERP skupine" +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "Only ldap groups" +msgstr "Samo LDAP skupine" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "Operator" msgstr "Operater" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,ldap_attribute:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." -msgstr "LDAP atribut za preverjanje.\nZa aktivni imenik uporabite memberOf." +msgstr "" +"LDAP atribut za preverjanje.\n" +"Za aktivni imenik uporabite memberOf." #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,group:0 -msgid "The OpenERP group to assign" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#, fuzzy +msgid "The Odoo group to assign" msgstr "OpenERP skupina za dodelitev" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,operator:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" -msgstr "Operater za primerjavo atributa z vrednostjo\nza aktivni imenik, uporabite 'contains'" +msgstr "" +"Operater za primerjavo atributa z vrednostjo\n" +"za aktivni imenik, uporabite 'contains'" #. module: users_ldap_groups -#: help:res.company.ldap.group_mapping,value:0 +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" -msgstr "Vrednost za primerjavo atributa.\nZa aktivni imenik uporabite dn željene skupine" +msgstr "" +"Vrednost za primerjavo atributa.\n" +"Za aktivni imenik uporabite dn željene skupine" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_users +msgid "Users" +msgstr "" #. module: users_ldap_groups -#: field:res.company.ldap.group_mapping,value:0 +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "Value" msgstr "Vrednost" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "res.company.ldap" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "res.company.ldap.group_mapping" +msgstr "" + +#~ msgid "OpenERP group" +#~ msgstr "OpenERP skupine" diff --git a/users_ldap_groups/i18n/users_ldap_groups.pot b/users_ldap_groups/i18n/users_ldap_groups.pot index c83ab22af5..278f12d688 100644 --- a/users_ldap_groups/i18n/users_ldap_groups.pot +++ b/users_ldap_groups/i18n/users_ldap_groups.pot @@ -1,12 +1,11 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: +# * users_ldap_groups # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-03-14 17:41+0000\n" -"PO-Revision-Date: 2014-03-14 17:41+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -14,3 +13,134 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +msgid "Created by" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +msgid "Created on" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +msgid "Define how Odoo groups are assigned to ldap users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator +msgid "Definition op LDAP operations" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +msgid "Display Name" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +msgid "Group mappings" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +msgid "ID" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "If this is checked, manual changes to group membership are undone on every login (so Odoo groups are always synchronous with LDAP groups). If not, manually added groups are preserved." +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +msgid "LDAP attribute" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +msgid "LDAP server" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +msgid "Last Modified on" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +msgid "Last Updated by" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +msgid "Last Updated on" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view +msgid "Map User Groups" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "Odoo group" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "Only ldap groups" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +msgid "Operator" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +msgid "The LDAP attribute to check.\n" +"For active directory, use memberOf." +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "The Odoo group to assign" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator +msgid "The operator to check the attribute against the value\n" +"For active directory, use 'contains'" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value +msgid "The value to check the attribute against.\n" +"For active directory, use the dn of the desired group" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_users +msgid "Users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +msgid "Value" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "res.company.ldap" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "res.company.ldap.group_mapping" +msgstr "" + From ad15e3aa96d7d6f04aba840cd1499ad2c3af78ea Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Fri, 9 Nov 2018 07:25:53 +0200 Subject: [PATCH 19/29] [MIG] users_ldap_groups: Migration to 12.0 --- users_ldap_groups/README.rst | 68 ++- users_ldap_groups/__init__.py | 1 - users_ldap_groups/__manifest__.py | 33 +- users_ldap_groups/i18n/de.po | 6 +- users_ldap_groups/i18n/es.po | 6 +- users_ldap_groups/i18n/fr.po | 53 ++- users_ldap_groups/i18n/pt_BR.po | 46 +- users_ldap_groups/i18n/sl.po | 6 +- users_ldap_groups/i18n/users_ldap_groups.pot | 6 +- users_ldap_groups/models/__init__.py | 2 - users_ldap_groups/models/res_company_ldap.py | 34 +- .../models/res_company_ldap_group_mapping.py | 41 +- .../models/res_company_ldap_operator.py | 32 +- users_ldap_groups/models/res_users.py | 12 +- users_ldap_groups/readme/CONTRIBUTORS.rst | 3 + users_ldap_groups/readme/DESCRIPTION.rst | 5 + users_ldap_groups/readme/USAGE.rst | 13 + .../static/description/index.html | 436 ++++++++++++++++++ users_ldap_groups/tests/__init__.py | 2 - .../tests/test_users_ldap_groups.py | 148 ++++-- ...ettings.xml => res_company_ldap_views.xml} | 17 +- 21 files changed, 780 insertions(+), 190 deletions(-) create mode 100644 users_ldap_groups/readme/CONTRIBUTORS.rst create mode 100644 users_ldap_groups/readme/DESCRIPTION.rst create mode 100644 users_ldap_groups/readme/USAGE.rst create mode 100644 users_ldap_groups/static/description/index.html rename users_ldap_groups/views/{base_config_settings.xml => res_company_ldap_views.xml} (57%) diff --git a/users_ldap_groups/README.rst b/users_ldap_groups/README.rst index 19c1eff636..b93a5de828 100644 --- a/users_ldap_groups/README.rst +++ b/users_ldap_groups/README.rst @@ -1,17 +1,47 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 - +====================== LDAP groups assignment ====================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github + :target: https://github.com/OCA/server-auth/tree/12.0/users_ldap_groups + :alt: OCA/server-auth +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/server-auth-12-0/server-auth-12-0-users_ldap_groups + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/251/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + Adds user accounts to groups based on rules defined by the administrator. +**Table of contents** + +.. contents:: + :local: + Usage ===== Define mappings in Settings / General Settings / LDAP Parameters -Decide whether you want only groups mapped from ldap (`Only ldap groups` checked) or a mix of manually set groups and ldap groups (`Only ldap groups` unchecked). Setting this to 'no' will result in users never losing privileges when you remove them from a ldap group, so that's a potential security issue. It is still the default to prevent losing group information by accident. +Decide whether you want only groups mapped from LDAP (`Only LDAP groups` checked) or a mix of manually set groups and LDAP groups (`Only LDAP groups` unchecked). Setting this to 'no' will result in users never losing privileges when you remove them from a LDAP group, so that's a potential security issue. It is still the default to prevent losing group information by accident. For active directory, use LDAP attribute 'memberOf' and operator 'contains'. Fill in the DN of the windows group as value and choose an Odoo group users with this windows group are to be assigned to. @@ -21,42 +51,46 @@ For posix accounts, use operator 'query' and a value like:: The operator query matches if the filter in value returns something, and value can contain ``$attribute`` which will be replaced by the first value of the -user's ldap record's attribute named `attribute`. +user's LDAP record's attribute named `attribute`. Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. +Do not contact contributors directly about support or help with technical issues. Credits ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Therp BV Contributors ------------- +~~~~~~~~~~~~ * Holger Brunn * Giacomo Spettoli +* Alexey Pelykh + +Maintainers +~~~~~~~~~~~ -Maintainer ----------- +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/server-auth `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/users_ldap_groups/__init__.py b/users_ldap_groups/__init__.py index 7517825865..4f6ad737fc 100644 --- a/users_ldap_groups/__init__.py +++ b/users_ldap_groups/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2012-2018 Therp BV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import models diff --git a/users_ldap_groups/__manifest__.py b/users_ldap_groups/__manifest__.py index 16dcb1b6d7..4f3fbcedb8 100644 --- a/users_ldap_groups/__manifest__.py +++ b/users_ldap_groups/__manifest__.py @@ -1,20 +1,27 @@ -# -*- coding: utf-8 -*- # Copyright 2012-2018 Therp BV +# Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - "name": "LDAP groups assignment", - "version": "10.0.0.0.0", - "depends": ["auth_ldap"], - "author": "Therp BV, Odoo Community Association (OCA)", - "license": "AGPL-3", - "summary": "Adds user accounts to groups based on rules defined " - "by the administrator.", - "category": "Authentication", - "data": [ - 'views/base_config_settings.xml', + 'name': 'LDAP groups assignment', + 'version': '12.0.1.0.0', + 'depends': [ + 'auth_ldap', + ], + 'author': + 'Therp BV, ' + 'Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'summary': + 'Adds user accounts to groups based on rules defined ' + 'by the administrator.', + 'category': 'Authentication', + 'data': [ + 'views/res_company_ldap_views.xml', 'security/ir.model.access.csv', ], - "external_dependencies": { - 'python': ['ldap'], + 'external_dependencies': { + 'python': [ + 'ldap' + ], }, } diff --git a/users_ldap_groups/i18n/de.po b/users_ldap_groups/i18n/de.po index 6299f129bc..d1263ebd8a 100644 --- a/users_ldap_groups/i18n/de.po +++ b/users_ldap_groups/i18n/de.po @@ -30,7 +30,7 @@ msgstr "Erstellt am:" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids -msgid "Define how Odoo groups are assigned to ldap users" +msgid "Define how Odoo groups are assigned to LDAP users" msgstr "" #. module: users_ldap_groups @@ -91,7 +91,7 @@ msgid "Last Updated on" msgstr "Zuletzt aktualisiert am" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "" @@ -102,7 +102,7 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups -msgid "Only ldap groups" +msgid "Only LDAP groups" msgstr "" #. module: users_ldap_groups diff --git a/users_ldap_groups/i18n/es.po b/users_ldap_groups/i18n/es.po index 5865ee6c4f..467ca7a169 100644 --- a/users_ldap_groups/i18n/es.po +++ b/users_ldap_groups/i18n/es.po @@ -30,7 +30,7 @@ msgstr "Creado en" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids -msgid "Define how Odoo groups are assigned to ldap users" +msgid "Define how Odoo groups are assigned to LDAP users" msgstr "" #. module: users_ldap_groups @@ -91,7 +91,7 @@ msgid "Last Updated on" msgstr "Última actualización en" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "" @@ -102,7 +102,7 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups -msgid "Only ldap groups" +msgid "Only LDAP groups" msgstr "" #. module: users_ldap_groups diff --git a/users_ldap_groups/i18n/fr.po b/users_ldap_groups/i18n/fr.po index 6ed8c3d9af..2c6a4abeae 100644 --- a/users_ldap_groups/i18n/fr.po +++ b/users_ldap_groups/i18n/fr.po @@ -8,15 +8,16 @@ msgstr "" "Project-Id-Version: server-tools (8.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-09-29 11:14+0000\n" -"PO-Revision-Date: 2015-09-18 13:56+0000\n" -"Last-Translator: <>\n" +"PO-Revision-Date: 2018-12-12 19:58+0000\n" +"Last-Translator: Alexandre Fayolle \n" "Language-Team: French (http://www.transifex.com/oca/OCA-server-tools-8-0/" "language/fr/)\n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.3\n" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid @@ -30,24 +31,24 @@ msgstr "Créé le" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids -msgid "Define how Odoo groups are assigned to ldap users" -msgstr "" +msgid "Define how Odoo groups are assigned to LDAP users" +msgstr "Définir comment les groupes Odoo sont attribués aux utilisateurs LDAP" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator msgid "Definition op LDAP operations" -msgstr "" +msgstr "Définition des opérations LDAP" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name msgid "Display Name" -msgstr "" +msgstr "Nom affiché" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids msgid "Group mappings" -msgstr "" +msgstr "Tableau de conversion des groupes" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id @@ -62,21 +63,23 @@ msgid "" "login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." msgstr "" +"Si activé, les configuration manuelles de groupes sont annulées à chaque " +"connexion (et donc les groupes Odoo sont toujours synchrones avec les " +"groupes LDAP). Sinon, les affectations manuelles de groupes sont préservées." #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute msgid "LDAP attribute" -msgstr "" +msgstr "Attributs LDAP" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id msgid "LDAP server" -msgstr "" +msgstr "Serveur LDAP" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update -#, fuzzy msgid "Last Modified on" msgstr "Dernière mise à jour le" @@ -91,24 +94,24 @@ msgid "Last Updated on" msgstr "Dernière mise à jour le" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" -msgstr "" +msgstr "Conversions de groupes utilisateurs" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id msgid "Odoo group" -msgstr "" +msgstr "Groupe Odoo" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups -msgid "Only ldap groups" -msgstr "" +msgid "Only LDAP groups" +msgstr "Uniquement les groupes LDAP" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator msgid "Operator" -msgstr "" +msgstr "Opérateur" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute @@ -116,11 +119,13 @@ msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." msgstr "" +"L'attribut LDAP à vérifier.\n" +"Pour Active Directory, utiliser memberOf." #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id msgid "The Odoo group to assign" -msgstr "" +msgstr "Groupe Odoo à assigner" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator @@ -128,6 +133,8 @@ msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" msgstr "" +"L'opérateur à utiliser pour vérifier la valeur de l'attribut.\n" +"Pour Active Directory, utilisez 'contains'." #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value @@ -135,23 +142,25 @@ msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" msgstr "" +"La valeur à comparer à l'attribut.\n" +"Pour Active Directory, utilisez le dn du groupe souhaité." #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_users msgid "Users" -msgstr "" +msgstr "Utilisateurs" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value msgid "Value" -msgstr "" +msgstr "Valeur" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap msgid "res.company.ldap" -msgstr "" +msgstr "res.company.ldap" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping msgid "res.company.ldap.group_mapping" -msgstr "" +msgstr "res.company.ldap.group_mapping" diff --git a/users_ldap_groups/i18n/pt_BR.po b/users_ldap_groups/i18n/pt_BR.po index 77261f254b..c9dd70de71 100644 --- a/users_ldap_groups/i18n/pt_BR.po +++ b/users_ldap_groups/i18n/pt_BR.po @@ -9,15 +9,16 @@ msgstr "" "Project-Id-Version: server-tools (8.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-09-29 11:14+0000\n" -"PO-Revision-Date: 2015-09-19 00:55+0000\n" -"Last-Translator: Armando Vulcano Junior \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-" -"tools-8-0/language/pt_BR/)\n" +"PO-Revision-Date: 2019-08-30 14:23+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/" +"OCA-server-tools-8-0/language/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.8\n" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid @@ -31,20 +32,19 @@ msgstr "Criado em" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids -#, fuzzy -msgid "Define how Odoo groups are assigned to ldap users" -msgstr "Define como grupos OpenERP são aribuídos aos usuários ldap" +msgid "Define how Odoo groups are assigned to LDAP users" +msgstr "Define como grupos Odoo são atribuídos aos usuários LDAP" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator msgid "Definition op LDAP operations" -msgstr "" +msgstr "Definição de operações LDAP" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name msgid "Display Name" -msgstr "" +msgstr "Exibir Nome" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids @@ -59,15 +59,14 @@ msgstr "Identificação" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups -#, fuzzy msgid "" "If this is checked, manual changes to group membership are undone on every " "login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." msgstr "" "Se esta opção for marcada, as alterações manuais para participação no grupo " -"são desfeitas em cada login (grupos para OpenERP estão sempre em sincronia " -"com grupos LDAP). Se não, grupos adicionados manualmente serão preservados." +"são desfeitas em cada login (grupos para Odoo estão sempre em sincronia com " +"grupos LDAP). Se não, grupos adicionados manualmente serão preservados." #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute @@ -82,9 +81,8 @@ msgstr "Servidor LDAP" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update -#, fuzzy msgid "Last Modified on" -msgstr "Última atualização em" +msgstr "Última Modificação em" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid @@ -97,19 +95,18 @@ msgid "Last Updated on" msgstr "Última atualização em" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "Mapear Grupos de Usuários" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id -#, fuzzy msgid "Odoo group" -msgstr "Apenas grupos ldap" +msgstr "Grupo Odoo" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups -msgid "Only ldap groups" +msgid "Only LDAP groups" msgstr "Apenas grupos ldap" #. module: users_ldap_groups @@ -128,9 +125,8 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id -#, fuzzy msgid "The Odoo group to assign" -msgstr "Grupo OpenERP para atribuir" +msgstr "Grupo Odoo para atribuir" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator @@ -139,7 +135,7 @@ msgid "" "For active directory, use 'contains'" msgstr "" "O operador para verificar o atributo contra o valor\n" -"Para active directory, use 'contains' " +"Para active directory, use 'contains'" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value @@ -153,7 +149,7 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_users msgid "Users" -msgstr "" +msgstr "Usuários" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value @@ -163,12 +159,12 @@ msgstr "Valor" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap msgid "res.company.ldap" -msgstr "" +msgstr "res.company.ldap" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping msgid "res.company.ldap.group_mapping" -msgstr "" +msgstr "res.company.ldap.group_mapping" #~ msgid "OpenERP group" #~ msgstr "Grupo OpenERP" diff --git a/users_ldap_groups/i18n/sl.po b/users_ldap_groups/i18n/sl.po index 2c39707f46..479ae390f8 100644 --- a/users_ldap_groups/i18n/sl.po +++ b/users_ldap_groups/i18n/sl.po @@ -33,7 +33,7 @@ msgstr "Ustvarjeno" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids #, fuzzy -msgid "Define how Odoo groups are assigned to ldap users" +msgid "Define how Odoo groups are assigned to LDAP users" msgstr "Določi način dodeljevanja OpenERP skupin LDAP uporabnikom" #. module: users_ldap_groups @@ -98,7 +98,7 @@ msgid "Last Updated on" msgstr "Zadnjič posodobljeno" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "Mapiraj uporabniške skupine" @@ -110,7 +110,7 @@ msgstr "Samo LDAP skupine" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups -msgid "Only ldap groups" +msgid "Only LDAP groups" msgstr "Samo LDAP skupine" #. module: users_ldap_groups diff --git a/users_ldap_groups/i18n/users_ldap_groups.pot b/users_ldap_groups/i18n/users_ldap_groups.pot index 278f12d688..a7a06984bd 100644 --- a/users_ldap_groups/i18n/users_ldap_groups.pot +++ b/users_ldap_groups/i18n/users_ldap_groups.pot @@ -25,7 +25,7 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids -msgid "Define how Odoo groups are assigned to ldap users" +msgid "Define how Odoo groups are assigned to LDAP users" msgstr "" #. module: users_ldap_groups @@ -82,7 +82,7 @@ msgid "Last Updated on" msgstr "" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.company_form_view +#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "" @@ -93,7 +93,7 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups -msgid "Only ldap groups" +msgid "Only LDAP groups" msgstr "" #. module: users_ldap_groups diff --git a/users_ldap_groups/models/__init__.py b/users_ldap_groups/models/__init__.py index 9adbf06b70..0faa1aebc6 100644 --- a/users_ldap_groups/models/__init__.py +++ b/users_ldap_groups/models/__init__.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# Copyright 2012-2018 Therp BV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import res_company_ldap from . import res_company_ldap_operator diff --git a/users_ldap_groups/models/res_company_ldap.py b/users_ldap_groups/models/res_company_ldap.py index 800446fd8d..58dcf74cd8 100644 --- a/users_ldap_groups/models/res_company_ldap.py +++ b/users_ldap_groups/models/res_company_ldap.py @@ -1,5 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright 2012-2018 Therp BV +# Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from logging import getLogger from odoo import api, fields, models @@ -11,29 +11,36 @@ class ResCompanyLdap(models.Model): group_mapping_ids = fields.One2many( 'res.company.ldap.group_mapping', - 'ldap_id', 'Group mappings', - help='Define how Odoo groups are assigned to ldap users', + 'ldap_id', + 'Group mappings', + help='Define how Odoo groups are assigned to LDAP users', ) only_ldap_groups = fields.Boolean( - 'Only ldap groups', default=False, - help='If this is checked, manual changes to group membership are ' - 'undone on every login (so Odoo groups are always synchronous ' - 'with LDAP groups). If not, manually added groups are preserved.', + 'Only LDAP groups', + default=False, + help=( + 'If this is checked, manual changes to group membership are ' + 'undone on every login (so Odoo groups are always synchronous ' + 'with LDAP groups). If not, manually added groups are preserved.' + ), ) @api.model - def get_or_create_user(self, conf, login, ldap_entry): + def _get_or_create_user(self, conf, login, ldap_entry): op_obj = self.env['res.company.ldap.operator'] - user_id = super(ResCompanyLdap, self).get_or_create_user( + user_id = super()._get_or_create_user( conf, login, ldap_entry ) if not user_id: return user_id this = self.browse(conf['id']) user = self.env['res.users'].browse(user_id) + + groups = [] + if this.only_ldap_groups: _logger.debug('deleting all groups from user %d', user_id) - user.write({'groups_id': [(5, False, False)]}) + groups.append((5, False, False)) for mapping in this.group_mapping_ids: operator = getattr(op_obj, mapping.operator) @@ -43,5 +50,10 @@ def get_or_create_user(self, conf, login, ldap_entry): _logger.debug( 'adding user %d to group %s', user, mapping.group_id.name, ) - user.write({'groups_id': [(4, mapping.group_id.id)]}) + groups.append((4, mapping.group_id.id, False)) + + user.write({ + 'groups_id': groups + }) + return user_id diff --git a/users_ldap_groups/models/res_company_ldap_group_mapping.py b/users_ldap_groups/models/res_company_ldap_group_mapping.py index e78faed192..d45aa43696 100644 --- a/users_ldap_groups/models/res_company_ldap_group_mapping.py +++ b/users_ldap_groups/models/res_company_ldap_group_mapping.py @@ -1,33 +1,50 @@ -# -*- coding: utf-8 -*- -# © 2012-2018 Therp BV +# Copyright 2012-2018 Therp BV +# Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models class ResCompanyLdapGroupMapping(models.Model): _name = 'res.company.ldap.group_mapping' + _description = 'LDAP group mapping' _rec_name = 'ldap_attribute' _order = 'ldap_attribute' ldap_id = fields.Many2one( - 'res.company.ldap', 'LDAP server', required=True, ondelete='cascade', + 'res.company.ldap', + 'LDAP server', + required=True, + ondelete='cascade', ) ldap_attribute = fields.Char( 'LDAP attribute', - help='The LDAP attribute to check.\n' - 'For active directory, use memberOf.') + help=( + 'The LDAP attribute to check.\n' + 'For active directory, use memberOf.' + ) + ) operator = fields.Selection( lambda self: [ (o, o) for o in self.env['res.company.ldap.operator'].operators() ], 'Operator', - help='The operator to check the attribute against the value\n' - 'For active directory, use \'contains\'', required=True) + help=( + 'The operator to check the attribute against the value\n' + 'For active directory, use \'contains\'' + ), + required=True + ) value = fields.Char( 'Value', - help='The value to check the attribute against.\n' - 'For active directory, use the dn of the desired group', - required=True) + help=( + 'The value to check the attribute against.\n' + 'For active directory, use the dn of the desired group' + ), + required=True + ) group_id = fields.Many2one( - 'res.groups', 'Odoo group', oldname='group', - help='The Odoo group to assign', required=True) + 'res.groups', + 'Odoo group', + help='The Odoo group to assign', + required=True + ) diff --git a/users_ldap_groups/models/res_company_ldap_operator.py b/users_ldap_groups/models/res_company_ldap_operator.py index 7dbd46f6ce..24299987e2 100644 --- a/users_ldap_groups/models/res_company_ldap_operator.py +++ b/users_ldap_groups/models/res_company_ldap_operator.py @@ -1,9 +1,10 @@ -# -*- coding: utf-8 -*- -# © 2012-2018 Therp BV +# Copyright 2012-2018 Therp BV +# Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from logging import getLogger from odoo import api, models from string import Template + _logger = getLogger(__name__) @@ -18,26 +19,33 @@ def operators(self): """Return names of function to call on this model as operator""" return ('contains', 'equals', 'query') - @api.model def contains(self, ldap_entry, mapping): return mapping.ldap_attribute in ldap_entry[1] and \ - mapping.value in ldap_entry[1][mapping.ldap_attribute] + mapping.value in map( + lambda x: x.decode(), + ldap_entry[1][mapping.ldap_attribute] + ) def equals(self, ldap_entry, mapping): return mapping.ldap_attribute in ldap_entry[1] and \ - unicode(mapping.value) == unicode( + mapping.value == str(list(map( + lambda x: x.decode(), ldap_entry[1][mapping.ldap_attribute] - ) + ))) def query(self, ldap_entry, mapping): query_string = Template(mapping.value).safe_substitute({ - attr: ldap_entry[1][attr][0] for attr in ldap_entry[1] + attr: ldap_entry[1][attr][0].decode() for attr in ldap_entry[1] }) - _logger.debug( - 'evaluating query group mapping, filter: %s' % query_string + + results = mapping.ldap_id._query( + mapping.ldap_id.read()[0], + query_string ) - results = mapping.ldap_id.query( - mapping.ldap_id.read()[0], query_string + _logger.debug( + 'Performed LDAP query "%s" results: %s', + query_string, + results ) - _logger.debug(results) + return bool(results) diff --git a/users_ldap_groups/models/res_users.py b/users_ldap_groups/models/res_users.py index ac75d73db2..c7d17fac4e 100644 --- a/users_ldap_groups/models/res_users.py +++ b/users_ldap_groups/models/res_users.py @@ -1,5 +1,5 @@ -# -*- coding: utf-8 -*- -# © 2018 Therp BV +# Copyright 2018 Therp BV +# Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import SUPERUSER_ID, api, models, registry @@ -9,7 +9,7 @@ class ResUsers(models.Model): @classmethod def _login(cls, db, login, password): - user_id = super(ResUsers, cls)._login(db, login, password) + user_id = super()._login(db, login, password) if not user_id: return user_id with registry(db).cursor() as cr: @@ -19,9 +19,9 @@ def _login(cls, db, login, password): # this case to apply ldap groups if necessary ldaps = user.company_id.ldaps if user.active and any(ldaps.mapped('only_ldap_groups')): - for conf in ldaps.get_ldap_dicts(): - entry = ldaps.authenticate(conf, login, password) + for conf in ldaps._get_ldap_dicts(): + entry = ldaps._authenticate(conf, login, password) if entry: - ldaps.get_or_create_user(conf, login, entry) + ldaps._get_or_create_user(conf, login, entry) break return user_id diff --git a/users_ldap_groups/readme/CONTRIBUTORS.rst b/users_ldap_groups/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..d36307b9ac --- /dev/null +++ b/users_ldap_groups/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Holger Brunn +* Giacomo Spettoli +* Alexey Pelykh diff --git a/users_ldap_groups/readme/DESCRIPTION.rst b/users_ldap_groups/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..c6f05468f6 --- /dev/null +++ b/users_ldap_groups/readme/DESCRIPTION.rst @@ -0,0 +1,5 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +Adds user accounts to groups based on rules defined by the administrator. diff --git a/users_ldap_groups/readme/USAGE.rst b/users_ldap_groups/readme/USAGE.rst new file mode 100644 index 0000000000..1f64dedacc --- /dev/null +++ b/users_ldap_groups/readme/USAGE.rst @@ -0,0 +1,13 @@ +Define mappings in Settings / General Settings / LDAP Parameters + +Decide whether you want only groups mapped from LDAP (`Only LDAP groups` checked) or a mix of manually set groups and LDAP groups (`Only LDAP groups` unchecked). Setting this to 'no' will result in users never losing privileges when you remove them from a LDAP group, so that's a potential security issue. It is still the default to prevent losing group information by accident. + +For active directory, use LDAP attribute 'memberOf' and operator 'contains'. Fill in the DN of the windows group as value and choose an Odoo group users with this windows group are to be assigned to. + +For posix accounts, use operator 'query' and a value like:: + + (&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid)) + +The operator query matches if the filter in value returns something, and value +can contain ``$attribute`` which will be replaced by the first value of the +user's LDAP record's attribute named `attribute`. diff --git a/users_ldap_groups/static/description/index.html b/users_ldap_groups/static/description/index.html new file mode 100644 index 0000000000..0db0260e67 --- /dev/null +++ b/users_ldap_groups/static/description/index.html @@ -0,0 +1,436 @@ + + + + + + +LDAP groups assignment + + + +
+

LDAP groups assignment

+ + +

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runbot

+License: AGPL-3 +

Adds user accounts to groups based on rules defined by the administrator.

+

Table of contents

+ +
+

Usage

+

Define mappings in Settings / General Settings / LDAP Parameters

+

Decide whether you want only groups mapped from LDAP (Only LDAP groups checked) or a mix of manually set groups and LDAP groups (Only LDAP groups unchecked). Setting this to ‘no’ will result in users never losing privileges when you remove them from a LDAP group, so that’s a potential security issue. It is still the default to prevent losing group information by accident.

+

For active directory, use LDAP attribute ‘memberOf’ and operator ‘contains’. Fill in the DN of the windows group as value and choose an Odoo group users with this windows group are to be assigned to.

+

For posix accounts, use operator ‘query’ and a value like:

+
+(&(cn=bzr)(objectClass=posixGroup)(memberUid=$uid))
+
+

The operator query matches if the filter in value returns something, and value +can contain $attribute which will be replaced by the first value of the +user’s LDAP record’s attribute named attribute.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Therp BV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/server-auth project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/users_ldap_groups/tests/__init__.py b/users_ldap_groups/tests/__init__.py index be1aab57a7..4aae447e0e 100644 --- a/users_ldap_groups/tests/__init__.py +++ b/users_ldap_groups/tests/__init__.py @@ -1,4 +1,2 @@ -# -*- coding: utf-8 -*- -# Copyright 2018 Therp BV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import test_users_ldap_groups diff --git a/users_ldap_groups/tests/test_users_ldap_groups.py b/users_ldap_groups/tests/test_users_ldap_groups.py index 0f6dbecf5c..f2880b2e2a 100644 --- a/users_ldap_groups/tests/test_users_ldap_groups.py +++ b/users_ldap_groups/tests/test_users_ldap_groups.py @@ -1,65 +1,115 @@ -# -*- coding: utf-8 -*- # Copyright 2018 Therp BV +# Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from mock import Mock, patch +from unittest import mock from odoo.tests.common import TransactionCase +from odoo import api, registry, SUPERUSER_ID + +_auth_ldap_ns = 'odoo.addons.auth_ldap' +_company_ldap_class = _auth_ldap_ns + '.models.res_company_ldap.CompanyLDAP' + + +class FakeLdapConnection(object): + def __init__(self, entries): + self.entries = entries + + def simple_bind_s(self, dn, passwd): + pass + + def search_st(self, dn, scope, ldap_filter, attributes, timeout): + if dn in self.entries: + return [(dn, dict(self.entries[dn]))] + return [] + + def unbind(self): + pass + + def unbind_s(self): + pass + + def __getattr__(self, name): + def wrapper(): + raise Exception("'%s' is not mocked" % name) + return wrapper -@patch('ldap.initialize', return_value=Mock( - search_st=Mock(return_value=[ - ('cn=hello', {'name': ['hello', 'hello2']}) - ]), -)) class TestUsersLdapGroups(TransactionCase): - def test_users_ldap_groups(self, ldap_initialize): + + def setUp(self): + super().setUp() + + self.group_system = self.env.ref('base.group_system') + + def test_users_ldap_groups(self): # _login does its work in a new cursor, so we need one too - with self.env.registry.cursor() as cr: - env = self.env(cr=cr) + with registry(self.env.cr.dbname).cursor() as cr: + env = api.Environment(cr, SUPERUSER_ID, {}) + group_contains = env['res.groups'].create({'name': 'contains'}) group_equals = env['res.groups'].create({'name': 'equals'}) group_query = env['res.groups'].create({'name': 'query'}) - env.ref('base.main_company').write({'ldaps': [(0, 0, { - 'ldap_server': 'localhost', - 'ldap_filter': '(&(objectClass=*),(uid=%s))', - 'ldap_base': 'base', - 'only_ldap_groups': True, - 'group_mapping_ids': [ - (0, 0, { - 'ldap_attribute': 'name', - 'operator': 'contains', - 'value': 'hello3', - 'group_id': env.ref('base.group_system').id, - }), - (0, 0, { - 'ldap_attribute': 'name', - 'operator': 'contains', - 'value': 'hello2', - 'group_id': group_contains.id, - }), - (0, 0, { - 'ldap_attribute': 'name', - 'operator': 'equals', - 'value': 'hello', - 'group_id': group_equals.id, - }), - (0, 0, { - 'ldap_attribute': '', - 'operator': 'query', - 'value': 'is not run because of patching', - 'group_id': group_query.id, - }), - ], - })]}) - - self.env['res.users']._login(self.env.cr.dbname, 'demo', 'wrong') - with self.env.registry.cursor() as cr: - env = self.env(cr=cr) - demo_user = env.ref('base.user_demo') + env.ref('base.main_company').write({'ldaps': [ + (5, False, False), + (0, 0, { + 'ldap_base': 'dc=users_ldap_groups,dc=example,dc=com', + 'ldap_filter': '(uid=%s)', + 'ldap_binddn': 'cn=bind,dc=example,dc=com', + 'create_user': True, + 'only_ldap_groups': True, + 'group_mapping_ids': [ + (0, 0, { + 'ldap_attribute': 'name', + 'operator': 'contains', + 'value': 'hello3', + 'group_id': self.group_system.id, + }), + (0, 0, { + 'ldap_attribute': 'name', + 'operator': 'contains', + 'value': 'hello2', + 'group_id': group_contains.id, + }), + (0, 0, { + 'ldap_attribute': 'name', + 'operator': 'equals', + 'value': 'hello', + 'group_id': group_equals.id, + }), + (0, 0, { + 'ldap_attribute': '', + 'operator': 'query', + 'value': 'is not run because of patching', + 'group_id': group_query.id, + }), + ], + }) + ]}) + + with mock.patch( + _company_ldap_class + '._connect', + return_value=FakeLdapConnection({ + 'dc=users_ldap_groups,dc=example,dc=com': { + 'cn': [b'User Name'], + 'name': [b'hello', b'hello2'] + } + }) + ): + user_id = self.env['res.users'].sudo().authenticate( + self.env.cr.dbname, + 'users_ldap_groups-username', + 'password', + {} + ) + + with registry(self.env.cr.dbname).cursor() as cr: + env = api.Environment(cr, SUPERUSER_ID, {}) + # this asserts group mappings from demo data - groups = demo_user.groups_id + user = env['res.users'].sudo().browse(user_id) + groups = user.groups_id self.assertIn(group_contains, groups) self.assertNotIn(group_equals, groups) self.assertIn(group_query, groups) - self.assertNotIn(env.ref('base.group_system'), groups) + self.assertNotIn(self.group_system, groups) # clean up env.ref('base.main_company').write({'ldaps': [(6, False, [])]}) diff --git a/users_ldap_groups/views/base_config_settings.xml b/users_ldap_groups/views/res_company_ldap_views.xml similarity index 57% rename from users_ldap_groups/views/base_config_settings.xml rename to users_ldap_groups/views/res_company_ldap_views.xml index 7a0ada56a1..16709c0d42 100644 --- a/users_ldap_groups/views/base_config_settings.xml +++ b/users_ldap_groups/views/res_company_ldap_views.xml @@ -1,15 +1,21 @@ - - base.config.settings - + + + res.company.ldap.form + res.company.ldap + - + - From adf991af69510c9611280ad81cb02625a164a1de Mon Sep 17 00:00:00 2001 From: Bole Date: Wed, 13 Nov 2019 15:17:55 +0000 Subject: [PATCH 20/29] Added translation using Weblate (Croatian) --- users_ldap_groups/i18n/hr.po | 150 +++++++++++++++++++++++++++++++++++ users_ldap_groups/i18n/sl.po | 36 ++++----- 2 files changed, 166 insertions(+), 20 deletions(-) create mode 100644 users_ldap_groups/i18n/hr.po diff --git a/users_ldap_groups/i18n/hr.po b/users_ldap_groups/i18n/hr.po new file mode 100644 index 0000000000..24a560e793 --- /dev/null +++ b/users_ldap_groups/i18n/hr.po @@ -0,0 +1,150 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * users_ldap_groups +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-11-13 17:34+0000\n" +"Last-Translator: Bole \n" +"Language-Team: none\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" +"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 3.8\n" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +msgid "Created by" +msgstr "Kreirao" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +msgid "Created on" +msgstr "Kreirano" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +msgid "Define how Odoo groups are assigned to LDAP users" +msgstr "Definiraj kako su Odoo grupe dodijeljene LDAP korisnicima" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator +msgid "Definition op LDAP operations" +msgstr "Definicija LDAP operacija" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +msgid "Display Name" +msgstr "Naziv" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +msgid "Group mappings" +msgstr "Mapiranje grupa" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +#, fuzzy +msgid "ID" +msgstr "ID" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "If this is checked, manual changes to group membership are undone on every login (so Odoo groups are always synchronous with LDAP groups). If not, manually added groups are preserved." +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +msgid "LDAP attribute" +msgstr "LDAP atribut" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +msgid "LDAP server" +msgstr "LDAP server" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +msgid "Last Modified on" +msgstr "Zadnje modificirano" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +msgid "Last Updated by" +msgstr "Zadnje ažurirano" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +msgid "Last Updated on" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form +msgid "Map User Groups" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "Odoo group" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +msgid "Only LDAP groups" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +msgid "Operator" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +msgid "The LDAP attribute to check.\n" +"For active directory, use memberOf." +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +msgid "The Odoo group to assign" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator +msgid "The operator to check the attribute against the value\n" +"For active directory, use 'contains'" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value +msgid "The value to check the attribute against.\n" +"For active directory, use the dn of the desired group" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_users +msgid "Users" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +msgid "Value" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "res.company.ldap" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "res.company.ldap.group_mapping" +msgstr "" diff --git a/users_ldap_groups/i18n/sl.po b/users_ldap_groups/i18n/sl.po index 479ae390f8..332099454c 100644 --- a/users_ldap_groups/i18n/sl.po +++ b/users_ldap_groups/i18n/sl.po @@ -9,16 +9,17 @@ msgstr "" "Project-Id-Version: server-tools (8.0)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-09-29 11:14+0000\n" -"PO-Revision-Date: 2015-09-24 11:48+0000\n" -"Last-Translator: Matjaž Mozetič \n" +"PO-Revision-Date: 2020-04-13 16:19+0000\n" +"Last-Translator: Matjaz Mozetic \n" "Language-Team: Slovenian (http://www.transifex.com/oca/OCA-server-tools-8-0/" "language/sl/)\n" "Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" -"%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " +"n%100==4 ? 2 : 3;\n" +"X-Generator: Weblate 3.10\n" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid @@ -32,20 +33,19 @@ msgstr "Ustvarjeno" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids -#, fuzzy msgid "Define how Odoo groups are assigned to LDAP users" -msgstr "Določi način dodeljevanja OpenERP skupin LDAP uporabnikom" +msgstr "Določi način dodeljevanja Odoo skupin LDAP uporabnikom" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap_operator msgid "Definition op LDAP operations" -msgstr "" +msgstr "Definicija LDAP operacij" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name msgid "Display Name" -msgstr "" +msgstr "Prikazani naziv" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids @@ -60,14 +60,13 @@ msgstr "ID" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups -#, fuzzy msgid "" "If this is checked, manual changes to group membership are undone on every " "login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." msgstr "" -"Če označeno, so vse ročne spremembe članov skupin prezrte ob vsaki prijavi " -"(tako so OpenERP skupine vedno sinhrone z LDAP skupinami). Če ni, se ročno " +"Če označeno, so vse ročne spremembe članov skupin prezrte ob vsaki prijavi (" +"tako so Odoo skupine vedno sinhrone z LDAP skupinami). Če ni, se ročno " "dodane skupine ohranijo." #. module: users_ldap_groups @@ -83,9 +82,8 @@ msgstr "LDAP strežnik" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update -#, fuzzy msgid "Last Modified on" -msgstr "Zadnjič posodobljeno" +msgstr "Zadnjič spremenjeno" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid @@ -104,9 +102,8 @@ msgstr "Mapiraj uporabniške skupine" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id -#, fuzzy msgid "Odoo group" -msgstr "Samo LDAP skupine" +msgstr "Odoo skupina" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups @@ -129,9 +126,8 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id -#, fuzzy msgid "The Odoo group to assign" -msgstr "OpenERP skupina za dodelitev" +msgstr "Odoo skupina za dodelitev" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator @@ -154,7 +150,7 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_users msgid "Users" -msgstr "" +msgstr "Uporabniki" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value @@ -164,12 +160,12 @@ msgstr "Vrednost" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap msgid "res.company.ldap" -msgstr "" +msgstr "res.company.ldap" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping msgid "res.company.ldap.group_mapping" -msgstr "" +msgstr "res.company.ldap.group_mapping" #~ msgid "OpenERP group" #~ msgstr "OpenERP skupine" From 4501d8a8772e90b99be07ff3a093f4036e6a1a72 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Wed, 4 Nov 2020 12:41:07 +0200 Subject: [PATCH 21/29] [UPD] Brainbean Apps => CorporateHub --- users_ldap_groups/README.rst | 4 +- users_ldap_groups/i18n/de.po | 68 +++++++------- users_ldap_groups/i18n/es.po | 68 +++++++------- users_ldap_groups/i18n/fr.po | 70 ++++++++------- users_ldap_groups/i18n/hr.po | 88 ++++++++++--------- users_ldap_groups/i18n/pt_BR.po | 74 +++++++++------- users_ldap_groups/i18n/sl.po | 78 ++++++++-------- users_ldap_groups/i18n/users_ldap_groups.pot | 70 +++++++-------- users_ldap_groups/readme/CONTRIBUTORS.rst | 4 +- .../static/description/index.html | 5 +- 10 files changed, 280 insertions(+), 249 deletions(-) diff --git a/users_ldap_groups/README.rst b/users_ldap_groups/README.rst index b93a5de828..ab84e1b2d2 100644 --- a/users_ldap_groups/README.rst +++ b/users_ldap_groups/README.rst @@ -76,7 +76,9 @@ Contributors * Holger Brunn * Giacomo Spettoli -* Alexey Pelykh +* `CorporateHub `__ + + * Alexey Pelykh Maintainers ~~~~~~~~~~~ diff --git a/users_ldap_groups/i18n/de.po b/users_ldap_groups/i18n/de.po index d1263ebd8a..f587d3e9c1 100644 --- a/users_ldap_groups/i18n/de.po +++ b/users_ldap_groups/i18n/de.po @@ -19,17 +19,22 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_uid msgid "Created by" msgstr "Erstellt von" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_date msgid "Created on" msgstr "Erstellt am:" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Define how Odoo groups are assigned to LDAP users" msgstr "" @@ -39,24 +44,24 @@ msgid "Definition op LDAP operations" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name msgid "Display Name" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Group mappings" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "" "If this is checked, manual changes to group membership are undone on every " "login (so Odoo groups are always synchronous with LDAP groups). If not, " @@ -64,73 +69,78 @@ msgid "" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "LDAP attribute" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "LDAP group mapping" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_id msgid "LDAP server" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update #, fuzzy msgid "Last Modified on" msgstr "Zuletzt aktualisiert am" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_uid msgid "Last Updated by" msgstr "Zuletzt aktualisiert von" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_date msgid "Last Updated on" msgstr "Zuletzt aktualisiert am" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form +#: model_terms:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "Odoo group" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "Only LDAP groups" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "Operator" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "The Odoo group to assign" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" @@ -142,16 +152,6 @@ msgid "Users" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "Value" msgstr "" - -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap -msgid "res.company.ldap" -msgstr "" - -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping -msgid "res.company.ldap.group_mapping" -msgstr "" diff --git a/users_ldap_groups/i18n/es.po b/users_ldap_groups/i18n/es.po index 467ca7a169..f898aebacd 100644 --- a/users_ldap_groups/i18n/es.po +++ b/users_ldap_groups/i18n/es.po @@ -19,17 +19,22 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_uid msgid "Created by" msgstr "Creado por" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_date msgid "Created on" msgstr "Creado en" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Define how Odoo groups are assigned to LDAP users" msgstr "" @@ -39,24 +44,24 @@ msgid "Definition op LDAP operations" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name msgid "Display Name" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Group mappings" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "" "If this is checked, manual changes to group membership are undone on every " "login (so Odoo groups are always synchronous with LDAP groups). If not, " @@ -64,73 +69,78 @@ msgid "" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "LDAP attribute" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "LDAP group mapping" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_id msgid "LDAP server" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update #, fuzzy msgid "Last Modified on" msgstr "Última actualización en" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_uid msgid "Last Updated by" msgstr "Última actualización de" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_date msgid "Last Updated on" msgstr "Última actualización en" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form +#: model_terms:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "Odoo group" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "Only LDAP groups" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "Operator" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "The Odoo group to assign" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" @@ -142,16 +152,6 @@ msgid "Users" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "Value" msgstr "" - -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap -msgid "res.company.ldap" -msgstr "" - -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping -msgid "res.company.ldap.group_mapping" -msgstr "" diff --git a/users_ldap_groups/i18n/fr.po b/users_ldap_groups/i18n/fr.po index 2c6a4abeae..19ae6fc047 100644 --- a/users_ldap_groups/i18n/fr.po +++ b/users_ldap_groups/i18n/fr.po @@ -20,17 +20,22 @@ msgstr "" "X-Generator: Weblate 3.3\n" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_uid msgid "Created by" msgstr "Créé par" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_date msgid "Created on" msgstr "Créé le" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Define how Odoo groups are assigned to LDAP users" msgstr "Définir comment les groupes Odoo sont attribués aux utilisateurs LDAP" @@ -40,24 +45,24 @@ msgid "Definition op LDAP operations" msgstr "Définition des opérations LDAP" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name msgid "Display Name" msgstr "Nom affiché" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Group mappings" msgstr "Tableau de conversion des groupes" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "" "If this is checked, manual changes to group membership are undone on every " "login (so Odoo groups are always synchronous with LDAP groups). If not, " @@ -68,53 +73,58 @@ msgstr "" "groupes LDAP). Sinon, les affectations manuelles de groupes sont préservées." #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "LDAP attribute" msgstr "Attributs LDAP" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "LDAP group mapping" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_id msgid "LDAP server" msgstr "Serveur LDAP" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update msgid "Last Modified on" msgstr "Dernière mise à jour le" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_uid msgid "Last Updated by" msgstr "Dernière mise à jour par" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_date msgid "Last Updated on" msgstr "Dernière mise à jour le" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form +#: model_terms:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "Conversions de groupes utilisateurs" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "Odoo group" msgstr "Groupe Odoo" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "Only LDAP groups" msgstr "Uniquement les groupes LDAP" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "Operator" msgstr "Opérateur" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." @@ -123,12 +133,12 @@ msgstr "" "Pour Active Directory, utiliser memberOf." #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "The Odoo group to assign" msgstr "Groupe Odoo à assigner" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" @@ -137,7 +147,7 @@ msgstr "" "Pour Active Directory, utilisez 'contains'." #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" @@ -151,16 +161,12 @@ msgid "Users" msgstr "Utilisateurs" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "Value" msgstr "Valeur" -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap -msgid "res.company.ldap" -msgstr "res.company.ldap" +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping -msgid "res.company.ldap.group_mapping" -msgstr "res.company.ldap.group_mapping" +#~ msgid "res.company.ldap.group_mapping" +#~ msgstr "res.company.ldap.group_mapping" diff --git a/users_ldap_groups/i18n/hr.po b/users_ldap_groups/i18n/hr.po index 24a560e793..c247a647be 100644 --- a/users_ldap_groups/i18n/hr.po +++ b/users_ldap_groups/i18n/hr.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * users_ldap_groups +# * users_ldap_groups # msgid "" msgstr "" @@ -13,22 +13,27 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" -"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 3.8\n" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_uid msgid "Created by" msgstr "Kreirao" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_date msgid "Created on" msgstr "Kreirano" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Define how Odoo groups are assigned to LDAP users" msgstr "Definiraj kako su Odoo grupe dodijeljene LDAP korisnicima" @@ -38,94 +43,105 @@ msgid "Definition op LDAP operations" msgstr "Definicija LDAP operacija" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name msgid "Display Name" msgstr "Naziv" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Group mappings" msgstr "Mapiranje grupa" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id #, fuzzy msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups -msgid "If this is checked, manual changes to group membership are undone on every login (so Odoo groups are always synchronous with LDAP groups). If not, manually added groups are preserved." +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__only_ldap_groups +msgid "" +"If this is checked, manual changes to group membership are undone on every " +"login (so Odoo groups are always synchronous with LDAP groups). If not, " +"manually added groups are preserved." msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "LDAP attribute" msgstr "LDAP atribut" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "LDAP group mapping" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_id msgid "LDAP server" msgstr "LDAP server" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update msgid "Last Modified on" msgstr "Zadnje modificirano" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_uid msgid "Last Updated by" msgstr "Zadnje ažurirano" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_date msgid "Last Updated on" msgstr "" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form +#: model_terms:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "Odoo group" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "Only LDAP groups" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "Operator" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute -msgid "The LDAP attribute to check.\n" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute +msgid "" +"The LDAP attribute to check.\n" "For active directory, use memberOf." msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "The Odoo group to assign" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator -msgid "The operator to check the attribute against the value\n" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__operator +msgid "" +"The operator to check the attribute against the value\n" "For active directory, use 'contains'" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value -msgid "The value to check the attribute against.\n" +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__value +msgid "" +"The value to check the attribute against.\n" "For active directory, use the dn of the desired group" msgstr "" @@ -135,16 +151,6 @@ msgid "Users" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "Value" msgstr "" - -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap -msgid "res.company.ldap" -msgstr "" - -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping -msgid "res.company.ldap.group_mapping" -msgstr "" diff --git a/users_ldap_groups/i18n/pt_BR.po b/users_ldap_groups/i18n/pt_BR.po index c9dd70de71..7ab15995d8 100644 --- a/users_ldap_groups/i18n/pt_BR.po +++ b/users_ldap_groups/i18n/pt_BR.po @@ -11,8 +11,8 @@ msgstr "" "POT-Creation-Date: 2015-09-29 11:14+0000\n" "PO-Revision-Date: 2019-08-30 14:23+0000\n" "Last-Translator: Rodrigo Macedo \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/" -"OCA-server-tools-8-0/language/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-server-" +"tools-8-0/language/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -21,17 +21,22 @@ msgstr "" "X-Generator: Weblate 3.8\n" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_uid msgid "Created by" msgstr "Criado por" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_date msgid "Created on" msgstr "Criado em" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Define how Odoo groups are assigned to LDAP users" msgstr "Define como grupos Odoo são atribuídos aos usuários LDAP" @@ -41,24 +46,24 @@ msgid "Definition op LDAP operations" msgstr "Definição de operações LDAP" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name msgid "Display Name" msgstr "Exibir Nome" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Group mappings" msgstr "Mapeamento de Grupos" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id msgid "ID" msgstr "Identificação" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "" "If this is checked, manual changes to group membership are undone on every " "login (so Odoo groups are always synchronous with LDAP groups). If not, " @@ -69,53 +74,58 @@ msgstr "" "grupos LDAP). Se não, grupos adicionados manualmente serão preservados." #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "LDAP attribute" msgstr "Atributo LDAP" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "LDAP group mapping" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_id msgid "LDAP server" msgstr "Servidor LDAP" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update msgid "Last Modified on" msgstr "Última Modificação em" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_uid msgid "Last Updated by" msgstr "Última atualização por" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_date msgid "Last Updated on" msgstr "Última atualização em" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form +#: model_terms:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "Mapear Grupos de Usuários" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "Odoo group" msgstr "Grupo Odoo" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "Only LDAP groups" msgstr "Apenas grupos ldap" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "Operator" msgstr "Operador" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." @@ -124,12 +134,12 @@ msgstr "" "Para active directory, use memberOf." #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "The Odoo group to assign" msgstr "Grupo Odoo para atribuir" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" @@ -138,7 +148,7 @@ msgstr "" "Para active directory, use 'contains'" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" @@ -152,19 +162,15 @@ msgid "Users" msgstr "Usuários" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "Value" msgstr "Valor" -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap -msgid "res.company.ldap" -msgstr "res.company.ldap" +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping -msgid "res.company.ldap.group_mapping" -msgstr "res.company.ldap.group_mapping" +#~ msgid "res.company.ldap.group_mapping" +#~ msgstr "res.company.ldap.group_mapping" #~ msgid "OpenERP group" #~ msgstr "Grupo OpenERP" diff --git a/users_ldap_groups/i18n/sl.po b/users_ldap_groups/i18n/sl.po index 332099454c..95ee926de2 100644 --- a/users_ldap_groups/i18n/sl.po +++ b/users_ldap_groups/i18n/sl.po @@ -17,22 +17,27 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || " -"n%100==4 ? 2 : 3;\n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3;\n" "X-Generator: Weblate 3.10\n" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_uid msgid "Created by" msgstr "Ustvaril" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_date msgid "Created on" msgstr "Ustvarjeno" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Define how Odoo groups are assigned to LDAP users" msgstr "Določi način dodeljevanja Odoo skupin LDAP uporabnikom" @@ -42,81 +47,86 @@ msgid "Definition op LDAP operations" msgstr "Definicija LDAP operacij" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name msgid "Display Name" msgstr "Prikazani naziv" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Group mappings" msgstr "Mapiranja skupin" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id msgid "ID" msgstr "ID" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "" "If this is checked, manual changes to group membership are undone on every " "login (so Odoo groups are always synchronous with LDAP groups). If not, " "manually added groups are preserved." msgstr "" -"Če označeno, so vse ročne spremembe članov skupin prezrte ob vsaki prijavi (" -"tako so Odoo skupine vedno sinhrone z LDAP skupinami). Če ni, se ročno " +"Če označeno, so vse ročne spremembe članov skupin prezrte ob vsaki prijavi " +"(tako so Odoo skupine vedno sinhrone z LDAP skupinami). Če ni, se ročno " "dodane skupine ohranijo." #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "LDAP attribute" msgstr "LDAP atribut" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "LDAP group mapping" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_id msgid "LDAP server" msgstr "LDAP strežnik" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update msgid "Last Modified on" msgstr "Zadnjič spremenjeno" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_uid msgid "Last Updated by" msgstr "Zadnji posodobil" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_date msgid "Last Updated on" msgstr "Zadnjič posodobljeno" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form +#: model_terms:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "Mapiraj uporabniške skupine" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "Odoo group" msgstr "Odoo skupina" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "Only LDAP groups" msgstr "Samo LDAP skupine" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "Operator" msgstr "Operater" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "" "The LDAP attribute to check.\n" "For active directory, use memberOf." @@ -125,12 +135,12 @@ msgstr "" "Za aktivni imenik uporabite memberOf." #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "The Odoo group to assign" msgstr "Odoo skupina za dodelitev" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "" "The operator to check the attribute against the value\n" "For active directory, use 'contains'" @@ -139,7 +149,7 @@ msgstr "" "za aktivni imenik, uporabite 'contains'" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "" "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" @@ -153,19 +163,15 @@ msgid "Users" msgstr "Uporabniki" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "Value" msgstr "Vrednost" -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap -msgid "res.company.ldap" -msgstr "res.company.ldap" +#~ msgid "res.company.ldap" +#~ msgstr "res.company.ldap" -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping -msgid "res.company.ldap.group_mapping" -msgstr "res.company.ldap.group_mapping" +#~ msgid "res.company.ldap.group_mapping" +#~ msgstr "res.company.ldap.group_mapping" #~ msgid "OpenERP group" #~ msgstr "OpenERP skupine" diff --git a/users_ldap_groups/i18n/users_ldap_groups.pot b/users_ldap_groups/i18n/users_ldap_groups.pot index a7a06984bd..9a49e13741 100644 --- a/users_ldap_groups/i18n/users_ldap_groups.pot +++ b/users_ldap_groups/i18n/users_ldap_groups.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -14,17 +14,22 @@ msgstr "" "Plural-Forms: \n" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_uid +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap +msgid "Company LDAP configuration" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_uid msgid "Created by" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_create_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_date msgid "Created on" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Define how Odoo groups are assigned to LDAP users" msgstr "" @@ -34,92 +39,97 @@ msgid "Definition op LDAP operations" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name msgid "Display Name" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ids +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__group_mapping_ids msgid "Group mappings" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id msgid "ID" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "If this is checked, manual changes to group membership are undone on every login (so Odoo groups are always synchronous with LDAP groups). If not, manually added groups are preserved." msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "LDAP attribute" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_id +#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping +msgid "LDAP group mapping" +msgstr "" + +#. module: users_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_id msgid "LDAP server" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping___last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator___last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update msgid "Last Modified on" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_uid +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_uid msgid "Last Updated by" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_write_date +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__write_date msgid "Last Updated on" msgstr "" #. module: users_ldap_groups -#: model:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form +#: model_terms:ir.ui.view,arch_db:users_ldap_groups.view_ldap_installer_form msgid "Map User Groups" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "Odoo group" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_only_ldap_groups +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__only_ldap_groups msgid "Only LDAP groups" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "Operator" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_ldap_attribute +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__ldap_attribute msgid "The LDAP attribute to check.\n" "For active directory, use memberOf." msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_group_id +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__group_id msgid "The Odoo group to assign" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_operator +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "The operator to check the attribute against the value\n" "For active directory, use 'contains'" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" msgstr "" @@ -130,17 +140,7 @@ msgid "Users" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping_value +#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__value msgid "Value" msgstr "" -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap -msgid "res.company.ldap" -msgstr "" - -#. module: users_ldap_groups -#: model:ir.model,name:users_ldap_groups.model_res_company_ldap_group_mapping -msgid "res.company.ldap.group_mapping" -msgstr "" - diff --git a/users_ldap_groups/readme/CONTRIBUTORS.rst b/users_ldap_groups/readme/CONTRIBUTORS.rst index d36307b9ac..1c100290d0 100644 --- a/users_ldap_groups/readme/CONTRIBUTORS.rst +++ b/users_ldap_groups/readme/CONTRIBUTORS.rst @@ -1,3 +1,5 @@ * Holger Brunn * Giacomo Spettoli -* Alexey Pelykh +* `CorporateHub `__ + + * Alexey Pelykh diff --git a/users_ldap_groups/static/description/index.html b/users_ldap_groups/static/description/index.html index 0db0260e67..dc60c8073d 100644 --- a/users_ldap_groups/static/description/index.html +++ b/users_ldap_groups/static/description/index.html @@ -417,7 +417,10 @@

Contributors

From 6791696bab8d7af2c06a6da38e0d5c8251a5d49b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Tue, 16 Feb 2021 07:40:15 +0000 Subject: [PATCH 22/29] [IMP] users_ldap_groups: black, isort, prettier --- users_ldap_groups/__manifest__.py | 32 ++-- users_ldap_groups/models/res_company_ldap.py | 40 +++-- .../models/res_company_ldap_group_mapping.py | 43 +++--- .../models/res_company_ldap_operator.py | 38 ++--- users_ldap_groups/models/res_users.py | 6 +- users_ldap_groups/readme/DESCRIPTION.rst | 2 +- .../tests/test_users_ldap_groups.py | 142 +++++++++++------- .../views/res_company_ldap_views.xml | 11 +- 8 files changed, 156 insertions(+), 158 deletions(-) diff --git a/users_ldap_groups/__manifest__.py b/users_ldap_groups/__manifest__.py index 4f3fbcedb8..8c36f0fd05 100644 --- a/users_ldap_groups/__manifest__.py +++ b/users_ldap_groups/__manifest__.py @@ -2,26 +2,14 @@ # Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - 'name': 'LDAP groups assignment', - 'version': '12.0.1.0.0', - 'depends': [ - 'auth_ldap', - ], - 'author': - 'Therp BV, ' - 'Odoo Community Association (OCA)', - 'license': 'AGPL-3', - 'summary': - 'Adds user accounts to groups based on rules defined ' - 'by the administrator.', - 'category': 'Authentication', - 'data': [ - 'views/res_company_ldap_views.xml', - 'security/ir.model.access.csv', - ], - 'external_dependencies': { - 'python': [ - 'ldap' - ], - }, + "name": "LDAP groups assignment", + "version": "12.0.1.0.0", + "depends": ["auth_ldap",], + "author": "Therp BV, " "Odoo Community Association (OCA)", + "license": "AGPL-3", + "summary": "Adds user accounts to groups based on rules defined " + "by the administrator.", + "category": "Authentication", + "data": ["views/res_company_ldap_views.xml", "security/ir.model.access.csv",], + "external_dependencies": {"python": ["ldap"],}, } diff --git a/users_ldap_groups/models/res_company_ldap.py b/users_ldap_groups/models/res_company_ldap.py index 58dcf74cd8..b886a760f2 100644 --- a/users_ldap_groups/models/res_company_ldap.py +++ b/users_ldap_groups/models/res_company_ldap.py @@ -2,58 +2,56 @@ # Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from logging import getLogger + from odoo import api, fields, models + _logger = getLogger(__name__) class ResCompanyLdap(models.Model): - _inherit = 'res.company.ldap' + _inherit = "res.company.ldap" group_mapping_ids = fields.One2many( - 'res.company.ldap.group_mapping', - 'ldap_id', - 'Group mappings', - help='Define how Odoo groups are assigned to LDAP users', + "res.company.ldap.group_mapping", + "ldap_id", + "Group mappings", + help="Define how Odoo groups are assigned to LDAP users", ) only_ldap_groups = fields.Boolean( - 'Only LDAP groups', + "Only LDAP groups", default=False, help=( - 'If this is checked, manual changes to group membership are ' - 'undone on every login (so Odoo groups are always synchronous ' - 'with LDAP groups). If not, manually added groups are preserved.' + "If this is checked, manual changes to group membership are " + "undone on every login (so Odoo groups are always synchronous " + "with LDAP groups). If not, manually added groups are preserved." ), ) @api.model def _get_or_create_user(self, conf, login, ldap_entry): - op_obj = self.env['res.company.ldap.operator'] - user_id = super()._get_or_create_user( - conf, login, ldap_entry - ) + op_obj = self.env["res.company.ldap.operator"] + user_id = super()._get_or_create_user(conf, login, ldap_entry) if not user_id: return user_id - this = self.browse(conf['id']) - user = self.env['res.users'].browse(user_id) + this = self.browse(conf["id"]) + user = self.env["res.users"].browse(user_id) groups = [] if this.only_ldap_groups: - _logger.debug('deleting all groups from user %d', user_id) + _logger.debug("deleting all groups from user %d", user_id) groups.append((5, False, False)) for mapping in this.group_mapping_ids: operator = getattr(op_obj, mapping.operator) - _logger.debug('checking mapping %s', mapping) + _logger.debug("checking mapping %s", mapping) if operator(ldap_entry, mapping): _logger.debug( - 'adding user %d to group %s', user, mapping.group_id.name, + "adding user %d to group %s", user, mapping.group_id.name, ) groups.append((4, mapping.group_id.id, False)) - user.write({ - 'groups_id': groups - }) + user.write({"groups_id": groups}) return user_id diff --git a/users_ldap_groups/models/res_company_ldap_group_mapping.py b/users_ldap_groups/models/res_company_ldap_group_mapping.py index d45aa43696..05d41e96ab 100644 --- a/users_ldap_groups/models/res_company_ldap_group_mapping.py +++ b/users_ldap_groups/models/res_company_ldap_group_mapping.py @@ -5,46 +5,37 @@ class ResCompanyLdapGroupMapping(models.Model): - _name = 'res.company.ldap.group_mapping' - _description = 'LDAP group mapping' - _rec_name = 'ldap_attribute' - _order = 'ldap_attribute' + _name = "res.company.ldap.group_mapping" + _description = "LDAP group mapping" + _rec_name = "ldap_attribute" + _order = "ldap_attribute" ldap_id = fields.Many2one( - 'res.company.ldap', - 'LDAP server', - required=True, - ondelete='cascade', + "res.company.ldap", "LDAP server", required=True, ondelete="cascade", ) ldap_attribute = fields.Char( - 'LDAP attribute', - help=( - 'The LDAP attribute to check.\n' - 'For active directory, use memberOf.' - ) + "LDAP attribute", + help=("The LDAP attribute to check.\n" "For active directory, use memberOf."), ) operator = fields.Selection( lambda self: [ - (o, o) for o in self.env['res.company.ldap.operator'].operators() + (o, o) for o in self.env["res.company.ldap.operator"].operators() ], - 'Operator', + "Operator", help=( - 'The operator to check the attribute against the value\n' - 'For active directory, use \'contains\'' + "The operator to check the attribute against the value\n" + "For active directory, use 'contains'" ), - required=True + required=True, ) value = fields.Char( - 'Value', + "Value", help=( - 'The value to check the attribute against.\n' - 'For active directory, use the dn of the desired group' + "The value to check the attribute against.\n" + "For active directory, use the dn of the desired group" ), - required=True + required=True, ) group_id = fields.Many2one( - 'res.groups', - 'Odoo group', - help='The Odoo group to assign', - required=True + "res.groups", "Odoo group", help="The Odoo group to assign", required=True ) diff --git a/users_ldap_groups/models/res_company_ldap_operator.py b/users_ldap_groups/models/res_company_ldap_operator.py index 24299987e2..2436754a0c 100644 --- a/users_ldap_groups/models/res_company_ldap_operator.py +++ b/users_ldap_groups/models/res_company_ldap_operator.py @@ -2,9 +2,10 @@ # Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from logging import getLogger -from odoo import api, models from string import Template +from odoo import api, models + _logger = getLogger(__name__) @@ -17,35 +18,24 @@ class ResCompanyLdapOperator(models.AbstractModel): @api.model def operators(self): """Return names of function to call on this model as operator""" - return ('contains', 'equals', 'query') + return ("contains", "equals", "query") def contains(self, ldap_entry, mapping): - return mapping.ldap_attribute in ldap_entry[1] and \ - mapping.value in map( - lambda x: x.decode(), - ldap_entry[1][mapping.ldap_attribute] - ) + return mapping.ldap_attribute in ldap_entry[1] and mapping.value in map( + lambda x: x.decode(), ldap_entry[1][mapping.ldap_attribute] + ) def equals(self, ldap_entry, mapping): - return mapping.ldap_attribute in ldap_entry[1] and \ - mapping.value == str(list(map( - lambda x: x.decode(), - ldap_entry[1][mapping.ldap_attribute] - ))) + return mapping.ldap_attribute in ldap_entry[1] and mapping.value == str( + list(map(lambda x: x.decode(), ldap_entry[1][mapping.ldap_attribute])) + ) def query(self, ldap_entry, mapping): - query_string = Template(mapping.value).safe_substitute({ - attr: ldap_entry[1][attr][0].decode() for attr in ldap_entry[1] - }) - - results = mapping.ldap_id._query( - mapping.ldap_id.read()[0], - query_string - ) - _logger.debug( - 'Performed LDAP query "%s" results: %s', - query_string, - results + query_string = Template(mapping.value).safe_substitute( + {attr: ldap_entry[1][attr][0].decode() for attr in ldap_entry[1]} ) + results = mapping.ldap_id._query(mapping.ldap_id.read()[0], query_string) + _logger.debug('Performed LDAP query "%s" results: %s', query_string, results) + return bool(results) diff --git a/users_ldap_groups/models/res_users.py b/users_ldap_groups/models/res_users.py index c7d17fac4e..a22757b22c 100644 --- a/users_ldap_groups/models/res_users.py +++ b/users_ldap_groups/models/res_users.py @@ -5,7 +5,7 @@ class ResUsers(models.Model): - _inherit = 'res.users' + _inherit = "res.users" @classmethod def _login(cls, db, login, password): @@ -14,11 +14,11 @@ def _login(cls, db, login, password): return user_id with registry(db).cursor() as cr: env = api.Environment(cr, SUPERUSER_ID, {}) - user = env['res.users'].browse(user_id) + user = env["res.users"].browse(user_id) # check if this user came from ldap, rerun get_or_create_user in # this case to apply ldap groups if necessary ldaps = user.company_id.ldaps - if user.active and any(ldaps.mapped('only_ldap_groups')): + if user.active and any(ldaps.mapped("only_ldap_groups")): for conf in ldaps._get_ldap_dicts(): entry = ldaps._authenticate(conf, login, password) if entry: diff --git a/users_ldap_groups/readme/DESCRIPTION.rst b/users_ldap_groups/readme/DESCRIPTION.rst index c6f05468f6..9ba486422d 100644 --- a/users_ldap_groups/readme/DESCRIPTION.rst +++ b/users_ldap_groups/readme/DESCRIPTION.rst @@ -1,5 +1,5 @@ .. image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: https://www.gnu.org/licenses/agpl :alt: License: AGPL-3 - + Adds user accounts to groups based on rules defined by the administrator. diff --git a/users_ldap_groups/tests/test_users_ldap_groups.py b/users_ldap_groups/tests/test_users_ldap_groups.py index f2880b2e2a..f69cad8430 100644 --- a/users_ldap_groups/tests/test_users_ldap_groups.py +++ b/users_ldap_groups/tests/test_users_ldap_groups.py @@ -2,11 +2,12 @@ # Copyright 2018 Brainbean Apps # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from unittest import mock + +from odoo import SUPERUSER_ID, api, registry from odoo.tests.common import TransactionCase -from odoo import api, registry, SUPERUSER_ID -_auth_ldap_ns = 'odoo.addons.auth_ldap' -_company_ldap_class = _auth_ldap_ns + '.models.res_company_ldap.CompanyLDAP' +_auth_ldap_ns = "odoo.addons.auth_ldap" +_company_ldap_class = _auth_ldap_ns + ".models.res_company_ldap.CompanyLDAP" class FakeLdapConnection(object): @@ -30,86 +31,113 @@ def unbind_s(self): def __getattr__(self, name): def wrapper(): raise Exception("'%s' is not mocked" % name) + return wrapper class TestUsersLdapGroups(TransactionCase): - def setUp(self): super().setUp() - self.group_system = self.env.ref('base.group_system') + self.group_system = self.env.ref("base.group_system") def test_users_ldap_groups(self): # _login does its work in a new cursor, so we need one too with registry(self.env.cr.dbname).cursor() as cr: env = api.Environment(cr, SUPERUSER_ID, {}) - group_contains = env['res.groups'].create({'name': 'contains'}) - group_equals = env['res.groups'].create({'name': 'equals'}) - group_query = env['res.groups'].create({'name': 'query'}) - env.ref('base.main_company').write({'ldaps': [ - (5, False, False), - (0, 0, { - 'ldap_base': 'dc=users_ldap_groups,dc=example,dc=com', - 'ldap_filter': '(uid=%s)', - 'ldap_binddn': 'cn=bind,dc=example,dc=com', - 'create_user': True, - 'only_ldap_groups': True, - 'group_mapping_ids': [ - (0, 0, { - 'ldap_attribute': 'name', - 'operator': 'contains', - 'value': 'hello3', - 'group_id': self.group_system.id, - }), - (0, 0, { - 'ldap_attribute': 'name', - 'operator': 'contains', - 'value': 'hello2', - 'group_id': group_contains.id, - }), - (0, 0, { - 'ldap_attribute': 'name', - 'operator': 'equals', - 'value': 'hello', - 'group_id': group_equals.id, - }), - (0, 0, { - 'ldap_attribute': '', - 'operator': 'query', - 'value': 'is not run because of patching', - 'group_id': group_query.id, - }), - ], - }) - ]}) + group_contains = env["res.groups"].create({"name": "contains"}) + group_equals = env["res.groups"].create({"name": "equals"}) + group_query = env["res.groups"].create({"name": "query"}) + env.ref("base.main_company").write( + { + "ldaps": [ + (5, False, False), + ( + 0, + 0, + { + "ldap_base": "dc=users_ldap_groups,dc=example,dc=com", + "ldap_filter": "(uid=%s)", + "ldap_binddn": "cn=bind,dc=example,dc=com", + "create_user": True, + "only_ldap_groups": True, + "group_mapping_ids": [ + ( + 0, + 0, + { + "ldap_attribute": "name", + "operator": "contains", + "value": "hello3", + "group_id": self.group_system.id, + }, + ), + ( + 0, + 0, + { + "ldap_attribute": "name", + "operator": "contains", + "value": "hello2", + "group_id": group_contains.id, + }, + ), + ( + 0, + 0, + { + "ldap_attribute": "name", + "operator": "equals", + "value": "hello", + "group_id": group_equals.id, + }, + ), + ( + 0, + 0, + { + "ldap_attribute": "", + "operator": "query", + "value": "is not run because of patching", + "group_id": group_query.id, + }, + ), + ], + }, + ), + ] + } + ) with mock.patch( - _company_ldap_class + '._connect', - return_value=FakeLdapConnection({ - 'dc=users_ldap_groups,dc=example,dc=com': { - 'cn': [b'User Name'], - 'name': [b'hello', b'hello2'] + _company_ldap_class + "._connect", + return_value=FakeLdapConnection( + { + "dc=users_ldap_groups,dc=example,dc=com": { + "cn": [b"User Name"], + "name": [b"hello", b"hello2"], } - }) + } + ), ): - user_id = self.env['res.users'].sudo().authenticate( - self.env.cr.dbname, - 'users_ldap_groups-username', - 'password', - {} + user_id = ( + self.env["res.users"] + .sudo() + .authenticate( + self.env.cr.dbname, "users_ldap_groups-username", "password", {} + ) ) with registry(self.env.cr.dbname).cursor() as cr: env = api.Environment(cr, SUPERUSER_ID, {}) # this asserts group mappings from demo data - user = env['res.users'].sudo().browse(user_id) + user = env["res.users"].sudo().browse(user_id) groups = user.groups_id self.assertIn(group_contains, groups) self.assertNotIn(group_equals, groups) self.assertIn(group_query, groups) self.assertNotIn(self.group_system, groups) # clean up - env.ref('base.main_company').write({'ldaps': [(6, False, [])]}) + env.ref("base.main_company").write({"ldaps": [(6, False, [])]}) diff --git a/users_ldap_groups/views/res_company_ldap_views.xml b/users_ldap_groups/views/res_company_ldap_views.xml index 16709c0d42..579ba7f19e 100644 --- a/users_ldap_groups/views/res_company_ldap_views.xml +++ b/users_ldap_groups/views/res_company_ldap_views.xml @@ -1,4 +1,4 @@ - + -

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/server-auth Translate me on Weblate Try me on Runbot

License: AGPL-3

Adds user accounts to groups based on rules defined by the administrator.

Table of contents

@@ -385,8 +385,11 @@

LDAP groups assignment

Usage

-

Define mappings in Settings / General Settings / LDAP Parameters

-

Decide whether you want only groups mapped from LDAP (Only LDAP groups checked) or a mix of manually set groups and LDAP groups (Only LDAP groups unchecked). Setting this to ‘no’ will result in users never losing privileges when you remove them from a LDAP group, so that’s a potential security issue. It is still the default to prevent losing group information by accident.

+

Define mappings in Settings / General Settings / Integrations / LDAP Authentication / LDAP Server

+

Decide whether you want only groups mapped from LDAP (Only LDAP groups checked) or a mix of manually set groups and LDAP groups (Only LDAP groups unchecked). +Setting this to “no” will result in users never losing privileges when you remove them from a LDAP group, so that’s a potential security issue. +It is still the default to prevent losing group information by accident. +If set to “Yes”, you need to make sure each user has at least on of the “User types” groups

For active directory, use LDAP attribute ‘memberOf’ and operator ‘contains’. Fill in the DN of the windows group as value and choose an Odoo group users with this windows group are to be assigned to.

For posix accounts, use operator ‘query’ and a value like:

@@ -401,7 +404,7 @@ 

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -421,6 +424,11 @@

Contributors

  • Alexey Pelykh <alexey.pelykh@corphub.eu>
  • +
  • Tecnativa <https://www.tecnativa.com>
      +
    • João Marques
    • +
    +
  • +
  • Dhara Solanki <dhara.solanki@initos.com>
  • @@ -430,7 +438,7 @@

    Maintainers

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/server-auth project on GitHub.

    +

    This module is part of the OCA/server-auth project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    From 8622bdad703d042b54d4b628e01ed2a249716e9d Mon Sep 17 00:00:00 2001 From: Ruben Ortlam Date: Wed, 21 Dec 2022 13:45:39 +0100 Subject: [PATCH 27/29] [MIG] users_ldap_groups: Migration to 15.0 --- users_ldap_groups/README.rst | 23 +++++----- users_ldap_groups/__manifest__.py | 2 +- users_ldap_groups/i18n/de.po | 11 +++-- users_ldap_groups/i18n/it.po | 8 ++-- users_ldap_groups/i18n/users_ldap_groups.pot | 11 +---- .../models/res_company_ldap_group_mapping.py | 2 - .../static/description/index.html | 42 ++++++++++--------- 7 files changed, 49 insertions(+), 50 deletions(-) diff --git a/users_ldap_groups/README.rst b/users_ldap_groups/README.rst index 07314a1d8f..dfb344485f 100644 --- a/users_ldap_groups/README.rst +++ b/users_ldap_groups/README.rst @@ -2,10 +2,13 @@ LDAP groups assignment ====================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:078a6ff3b7932f9af4da1b3af63e6b503dfbdb5026b3bbdcfee95372995c3ae2 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ LDAP groups assignment :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--auth-lightgray.png?logo=github - :target: https://github.com/OCA/server-auth/tree/14.0/users_ldap_groups + :target: https://github.com/OCA/server-auth/tree/15.0/users_ldap_groups :alt: OCA/server-auth .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-auth-14-0/server-auth-14-0-users_ldap_groups + :target: https://translation.odoo-community.org/projects/server-auth-15-0/server-auth-15-0-users_ldap_groups :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/251/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-auth&target_branch=15.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| .. image:: https://img.shields.io/badge/license-AGPL--3-blue.png :target: https://www.gnu.org/licenses/agpl @@ -61,8 +64,8 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -100,6 +103,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-auth `_ project on GitHub. +This module is part of the `OCA/server-auth `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/users_ldap_groups/__manifest__.py b/users_ldap_groups/__manifest__.py index f7dfaa1535..0a408ff333 100644 --- a/users_ldap_groups/__manifest__.py +++ b/users_ldap_groups/__manifest__.py @@ -4,7 +4,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "LDAP groups assignment", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "depends": ["auth_ldap"], "author": "Therp BV, " "Odoo Community Association (OCA)", "website": "https://github.com/OCA/server-auth", diff --git a/users_ldap_groups/i18n/de.po b/users_ldap_groups/i18n/de.po index f587d3e9c1..7f693fe40a 100644 --- a/users_ldap_groups/i18n/de.po +++ b/users_ldap_groups/i18n/de.po @@ -45,7 +45,6 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name msgid "Display Name" msgstr "" @@ -56,7 +55,6 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id msgid "ID" msgstr "ID" @@ -85,7 +83,6 @@ msgstr "" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update #, fuzzy msgid "Last Modified on" msgstr "Zuletzt aktualisiert am" @@ -132,6 +129,14 @@ msgstr "" msgid "The Odoo group to assign" msgstr "" +#. module: users_ldap_groups +#: code:addons/users_ldap_groups/models/res_company_ldap.py:0 +#, python-format +msgid "" +"The created user needs to have one (and only one) of the 'User types /' " +"groups defined." +msgstr "" + #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap_group_mapping__operator msgid "" diff --git a/users_ldap_groups/i18n/it.po b/users_ldap_groups/i18n/it.po index 83c21998fb..5adb3344d8 100644 --- a/users_ldap_groups/i18n/it.po +++ b/users_ldap_groups/i18n/it.po @@ -6,15 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2021-12-14 16:24+0000\n" -"Last-Translator: Sergio Zanchetta \n" +"PO-Revision-Date: 2023-01-18 13:45+0000\n" +"Last-Translator: Francesco Foresti \n" "Language-Team: none\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.3.2\n" +"X-Generator: Weblate 4.14.1\n" #. module: users_ldap_groups #: model:ir.model,name:users_ldap_groups.model_res_company_ldap @@ -29,7 +29,7 @@ msgstr "Creato da" #. module: users_ldap_groups #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__create_date msgid "Created on" -msgstr "Data creazione" +msgstr "Creato il" #. module: users_ldap_groups #: model:ir.model.fields,help:users_ldap_groups.field_res_company_ldap__group_mapping_ids diff --git a/users_ldap_groups/i18n/users_ldap_groups.pot b/users_ldap_groups/i18n/users_ldap_groups.pot index 4bf5f5a764..2825e27a33 100644 --- a/users_ldap_groups/i18n/users_ldap_groups.pot +++ b/users_ldap_groups/i18n/users_ldap_groups.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -39,10 +39,7 @@ msgid "Definition op LDAP operations" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__display_name #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__display_name -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_users__display_name msgid "Display Name" msgstr "" @@ -52,10 +49,7 @@ msgid "Group mappings" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap__id #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping__id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator__id -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_users__id msgid "ID" msgstr "" @@ -83,10 +77,7 @@ msgid "LDAP server" msgstr "" #. module: users_ldap_groups -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap____last_update #: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_group_mapping____last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_company_ldap_operator____last_update -#: model:ir.model.fields,field_description:users_ldap_groups.field_res_users____last_update msgid "Last Modified on" msgstr "" diff --git a/users_ldap_groups/models/res_company_ldap_group_mapping.py b/users_ldap_groups/models/res_company_ldap_group_mapping.py index c893dd47cb..f598aa2f81 100644 --- a/users_ldap_groups/models/res_company_ldap_group_mapping.py +++ b/users_ldap_groups/models/res_company_ldap_group_mapping.py @@ -24,7 +24,6 @@ class ResCompanyLdapGroupMapping(models.Model): lambda self: [ (o, o) for o in self.env["res.company.ldap.operator"].operators() ], - "Operator", help=( "The operator to check the attribute against the value\n" "For active directory, use 'contains'" @@ -32,7 +31,6 @@ class ResCompanyLdapGroupMapping(models.Model): required=True, ) value = fields.Char( - "Value", help=( "The value to check the attribute against.\n" "For active directory, use the dn of the desired group" diff --git a/users_ldap_groups/static/description/index.html b/users_ldap_groups/static/description/index.html index b4fb3bb67c..91a75b919a 100644 --- a/users_ldap_groups/static/description/index.html +++ b/users_ldap_groups/static/description/index.html @@ -1,20 +1,20 @@ - + - + LDAP groups assignment