itpp-labs / access-addons Goto Github PK
View Code? Open in Web Editor NEWOdoo Addons for extended access control
Home Page: https://itpp.dev
Odoo Addons for extended access control
Home Page: https://itpp.dev
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
There seems to be a problem with CRM general settings. Here's how to reproduce:
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Otherwise direct iteration to DB may be needed to restore access
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Steps to reproduce the error:
Let's say we run using this link: /auth_quick/login?build_login=admin
But we haven't such login as admin in the database.
After this code:
access-addons/auth_quick/controllers/main.py
Lines 34 to 35 in 28c61ac
ValueError
ValueError: invalid literal for int() with base 10: 'False'
Traceback (most recent call last)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 142, in application
return application_unproxied(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/service/wsgi_server.py", line 117, in application_unproxied
result = odoo.http.root(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1281, in __call__
return self.dispatch(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1251, in __call__
return self.app(environ, start_wrapped)
File "/usr/lib/python3/dist-packages/werkzeug/middleware/shared_data.py", line 220, in __call__
return self.app(environ, start_response)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 1450, in dispatch
result = ir_http._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/website_sale/models/ir_http.py", line 15, in _dispatch
return super(IrHttp, cls)._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_http.py", line 172, in _dispatch
response = super(Http, cls)._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/auth_signup/models/ir_http.py", line 19, in _dispatch
return super(Http, cls)._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/web_editor/models/ir_http.py", line 22, in _dispatch
return super(IrHttp, cls)._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/utm/models/ir_http.py", line 29, in _dispatch
response = super(IrHttp, cls)._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/http_routing/models/ir_http.py", line 516, in _dispatch
result = super(IrHttp, cls)._dispatch()
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 233, in _dispatch
return cls._handle_exception(e)
File "/usr/lib/python3/dist-packages/odoo/addons/utm/models/ir_http.py", line 34, in _handle_exception
response = super(IrHttp, cls)._handle_exception(exc)
File "/usr/lib/python3/dist-packages/odoo/addons/http_routing/models/ir_http.py", line 607, in _handle_exception
return super(IrHttp, cls)._handle_exception(exception)
File "/usr/lib/python3/dist-packages/odoo/addons/bae/models/ir_http.py", line 198, in _handle_exception
raise exceptio
File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 229, in _dispatch
result = request.dispatch()
File "/usr/lib/python3/dist-packages/odoo/http.py", line 803, in dispatch
r = self._call_function(**self.params)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 345, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 93, in wrapper
return f(dbname, *args, **kwargs)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 338, in checked_call
result = self.endpoint(*a, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 909, in __call__
return self.method(*args, **kw)
File "/usr/lib/python3/dist-packages/odoo/http.py", line 510, in response_wrap
response = f(*args, **kw)
File "/mnt/addons/saas-addons/auth_quick_master/controllers/main.py", line 21, in get_token
'build_user_id': build_user_id,
File "<decorator-gen-123>", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 322, in _model_create_single
return create(self, arg)
File "/mnt/addons/saas-addons/saas/models/auth_quick_master_token.py", line 11, in create
res = super(Token, self).create(vals)
File "<decorator-gen-3>", line 2, in create
File "/usr/lib/python3/dist-packages/odoo/api.py", line 343, in _model_create_multi
return create(self, [arg])
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3732, in create
records = self._create(data_list)
File "/usr/lib/python3/dist-packages/odoo/models.py", line 3804, in _create
col_val = field.convert_to_column(val, self, stored)
File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1135, in convert_to_column
return int(value or 0)
ValueError: invalid literal for int() with base 10: 'False'
Expected behavior:
Don't get such an error, but get a response that there is no such login
Hi,
Users cannot be added to sales teams when install hidden_admin.
Steps:
I try uninstall hidden_access and install (It works)
Too "disable" the rule "Only admin can see admin user" (Active field) and this works. If I active before too works.
Note: This test are execute without superuser, in other words, other user.
Move to this repo?
https://github.com/it-projects-llc/odoo-saas-tools/tree/11.0/oauth_provider
The module should allow specifying which admins can switch to superuser mode (on installation set True to all existing admins and False for any new users)
Odoo version: 14.0
The module should be added as dependencies to ir_rule_protected
as a solution for this todo: https://github.com/itpp-labs/access-addons/blob/7728bfd35dfea0fb8464f0de01fd4472eda576ab/ir_rule_protected/README.rst#roadmap
I have a problem with the module restricted administration rights, I think that it's a regression.
This error appaer in user menu and inventory settings (I believe that in other views).
Invalid view definition
Error details:
Field `sel_groups_11` does not exist
Error context:
View `res.users.groups`
[view_id: 152, xml_id: base.user_groups_view, model: res.users, parent_id: 149]
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
We need this commit in previous versions
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hi,
Is there any reason group_menu_no_access is left un-instalable for version V11 only?
Thanks You
Hi
OCB/odoo/addons/base/ir/ir_rule.py
changed in return from _compute_domain,
could you please add this modification ...
Thanks
REgards
Erro:
Odoo Server Error
Traceback (most recent call last):
File "/home/raphael/odoo11/odoo/odoo/tools/convert.py", line 741, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/home/raphael/odoo11/odoo/odoo/tools/convert.py", line 651, in _tag_record
id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
File "/home/raphael/odoo11/odoo/odoo/addons/base/ir/ir_model.py", line 1469, in _update
record = record.create(values)
File "/home/raphael/odoo11/odoo/odoo/addons/base/res/res_users.py", line 690, in create
self._update_user_groups_view()
File "/home/raphael/odoo11/access-addons/access_restricted/models/res_users.py", line 37, in _update_user_groups_view
self.env['ir.config_parameter'].sudo().set_param(IR_CONFIG_NAME, real_uid)
File "/home/raphael/odoo11/odoo-saas-tools/saas_portal/models/ir_config_parameter.py", line 19, in set_param
return super(IrConfigParameter, self).set_param(key, value, groups=groups)
TypeError: set_param() got an unexpected keyword argument 'groups'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/raphael/odoo11/odoo/odoo/http.py", line 647, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/raphael/odoo11/odoo/odoo/http.py", line 307, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/home/raphael/odoo11/odoo/odoo/tools/pycompat.py", line 87, in reraise
raise value
File "/home/raphael/odoo11/odoo/odoo/http.py", line 689, in dispatch
result = self._call_function(**self.params)
File "/home/raphael/odoo11/odoo/odoo/http.py", line 339, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/home/raphael/odoo11/odoo/odoo/service/model.py", line 97, in wrapper
return f(dbname, *args, **kwargs)
File "/home/raphael/odoo11/odoo/odoo/http.py", line 332, in checked_call
result = self.endpoint(*a, **kw)
File "/home/raphael/odoo11/odoo/odoo/http.py", line 933, in __call__
return self.method(*args, **kw)
File "/home/raphael/odoo11/odoo/odoo/http.py", line 512, in response_wrap
response = f(*args, **kw)
File "/home/raphael/odoo11/odoo/addons/web/controllers/main.py", line 934, in call_button
action = self._call_kw(model, method, args, {})
File "/home/raphael/odoo11/odoo/addons/web/controllers/main.py", line 922, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/home/raphael/odoo11/odoo/odoo/api.py", line 689, in call_kw
return call_kw_multi(method, model, args, kwargs)
File "/home/raphael/odoo11/odoo/odoo/api.py", line 680, in call_kw_multi
result = method(recs, *args, **kwargs)
File "<decorator-gen-39>", line 2, in button_immediate_install
File "/home/raphael/odoo11/odoo/odoo/addons/base/module/module.py", line 71, in check_and_log
return method(self, *args, **kwargs)
File "/home/raphael/odoo11/odoo/odoo/addons/base/module/module.py", line 448, in button_immediate_install
return self._button_immediate_function(type(self).button_install)
File "/home/raphael/odoo11/odoo/odoo/addons/base/module/module.py", line 541, in _button_immediate_function
modules.registry.Registry.new(self._cr.dbname, update_module=True)
File "/home/raphael/odoo11/odoo/odoo/modules/registry.py", line 85, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/raphael/odoo11/odoo/odoo/modules/loading.py", line 343, in load_modules
loaded_modules, update_module)
File "/home/raphael/odoo11/odoo/odoo/modules/loading.py", line 242, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/home/raphael/odoo11/odoo/odoo/modules/loading.py", line 156, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/home/raphael/odoo11/odoo/odoo/modules/loading.py", line 94, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/home/raphael/odoo11/odoo/odoo/tools/convert.py", line 788, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/home/raphael/odoo11/odoo/odoo/tools/convert.py", line 849, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/home/raphael/odoo11/odoo/odoo/tools/convert.py", line 748, in parse
exc_info[2]
File "/home/raphael/odoo11/odoo/odoo/tools/pycompat.py", line 86, in reraise
raise value.with_traceback(tb)
File "/home/raphael/odoo11/odoo/odoo/tools/convert.py", line 741, in parse
self._tags[rec.tag](rec, de, mode=mode)
File "/home/raphael/odoo11/odoo/odoo/tools/convert.py", line 651, in _tag_record
id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
File "/home/raphael/odoo11/odoo/odoo/addons/base/ir/ir_model.py", line 1469, in _update
record = record.create(values)
File "/home/raphael/odoo11/odoo/odoo/addons/base/res/res_users.py", line 690, in create
self._update_user_groups_view()
File "/home/raphael/odoo11/access-addons/access_restricted/models/res_users.py", line 37, in _update_user_groups_view
self.env['ir.config_parameter'].sudo().set_param(IR_CONFIG_NAME, real_uid)
File "/home/raphael/odoo11/odoo-saas-tools/saas_portal/models/ir_config_parameter.py", line 19, in set_param
return super(IrConfigParameter, self).set_param(key, value, groups=groups)
odoo.tools.convert.ParseError: "set_param() got an unexpected keyword argument 'groups'" while parsing /home/raphael/odoo11/access-addons/access_restricted/security/access_restricted_security.xml:3, near
<record id="group_allow_add_implied_from_settings" model="res.groups">
<field name="name">Allow add implied groups from settings</field>
</record>
FIX:
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
As stated in documentation ( https://github.com/it-projects-llc/access-addons/blob/12.0/access_apps/doc/index.rst ) if you choose to Select blank line in Apps access
security category, then User can't install apps from anywhere. But, if we go to module's Configuration
(e.g Website's configuration), we can see Apps
menu item which in my opinion is wrong.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The requested operation ("read" on "Lead/Opportunity" (crm.lead)) was rejected because of the following rules:
- Multi-Website Leads
(Records: backend (id=49), User: Mitchell Admin (id=2))
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Is there a way to reset the counter that limits the registration number, for example, to restart every month?
I was testing the auth_quick module and we have the issue when the database is behind a reverse proxy or ingress.
The issue is rised when the redirect call /auth_quick/check-token.
curl -vvvv http://address/auth_quick/check-token?token=3299b5a1-55ca-4593-9250-da87cf1f28e5
After doing to testing using curl, because at first I was thinking that maybe it wasn't able to find the route, but what I noticed is i that f you call the method without the token parameter, Odoo will give an error telling that is missing a positional value, and this is correct. But when the token and it's value is added, it's like the route doesn't exists.
Locally, in the same machine, it works as supposed to be.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
I have a access restricted when a user admin (not superuser) want "Apply" changes in settings of inventory or accounting modules (maybe others).
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\n
I'm testing the module and comment this rule and works correctly.
https://github.com/yelizariev/access-addons/blob/9.0/access_restricted/security.xml#L16
Steps to reproduce:
Hi Yelizariev,
we receive the following error message when we try to edit a user.
The error is coming form the module
We are on latest Odoo version and are also using latest versions of your module.
Invalid view definition
Error details:
Field `sel_groups_11` does not exist
Error context:
View `res.users.groups`
[view_id: 152, xml_id: base.user_groups_view, model: res.users, parent_id: 149]
Thanks Andi
Recreate:
Version 9 newest version from git
Modules newest Versions from git
login as User with access to modify the Users
Settings
Users - Users
Click on User
Edit
Error Message appears
Message disappears when deinstalling access_restricted which also deinstalls other modules!
access_apps : to remove
access_restricted : to remove
access_settings_menu : to remove
web_debranding : to remove
website_debranding : to remove
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.