-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[ADD] 8.0 - New module 'base_user_role' to manage user roles efficiently #608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bc35a1c
[ADD] New module 'base_user_role'
sebalix cbed5a5
[FIX] base_user_role - Review
sebalix df1ca76
[FIX] base_user_role - Review s/is_active/is_enabled/
sebalix 5b8053e
[FIX] base_user_role - Review s/is_active/is_enabled/
sebalix 4295c2c
[IMP] base_user_role - Translations updated (template + FR)
sebalix 6227edf
[FIX] base_user_role - Lint
sebalix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
| :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
| :alt: License: AGPL-3 | ||
|
|
||
| ========== | ||
| User roles | ||
| ========== | ||
|
|
||
| This module was written to extend the standard functionality regarding users | ||
| and groups management. | ||
| It helps creating well-defined user roles and associating them to users. | ||
|
|
||
| It can become very hard to maintain a large number of user profiles over time, | ||
| juggling with many technical groups. For this purpose, this module will help | ||
| you to: | ||
|
|
||
| * define functional roles by aggregating low-level groups, | ||
| * set user accounts with the predefined roles (roles are cumulative), | ||
| * update groups of all relevant user accounts (all at once), | ||
| * ensure that user accounts will have the groups defined in their roles | ||
| (nothing more, nothing less). In other words, you can not set groups | ||
| manually on a user as long as there is roles configured on it, | ||
| * activate/deactivate roles depending on the date (useful to plan holidays, etc) | ||
| * get a quick overview of roles and the related user accounts. | ||
|
|
||
| That way you make clear the different responsabilities within a company, and | ||
| are able to add and update user accounts in a scalable and reliable way. | ||
|
|
||
| Configuration | ||
| ============= | ||
|
|
||
| To configure this module, you need to go to *Configuration / Users / Roles*, | ||
| and create a new role. From there, you can add groups to compose your role, | ||
| and then associate users to it. | ||
|
|
||
| Roles: | ||
|
|
||
| .. image:: /base_user_role/static/description/roles.png | ||
|
|
||
| Add groups: | ||
|
|
||
| .. image:: /base_user_role/static/description/role_groups.png | ||
|
|
||
| Add users (with dates or not): | ||
|
|
||
| .. image:: /base_user_role/static/description/role_users.png | ||
|
|
||
| Bug Tracker | ||
| =========== | ||
|
|
||
| Bugs are tracked on `GitHub Issues | ||
| <https://github.com/OCA/server-tools/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. | ||
|
|
||
| Credits | ||
| ======= | ||
|
|
||
| Images | ||
| ------ | ||
|
|
||
| * Oxygen Team: `Icon <http://www.iconarchive.com/show/oxygen-icons-by-oxygen-icons.org/Actions-user-group-new-icon.html>`_ (LGPL) | ||
|
|
||
| Contributors | ||
| ------------ | ||
|
|
||
| * Sébastien Alix <sebastien.alix@osiell.com> | ||
|
|
||
| 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 https://odoo-community.org. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # Copyright 2014 ABF OSIELL <http://osiell.com> | ||
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
|
||
| { | ||
| 'name': 'User roles', | ||
| 'version': '8.0.1.1.0', | ||
| 'category': 'Tools', | ||
| 'author': 'ABF OSIELL, Odoo Community Association (OCA)', | ||
| 'license': 'AGPL-3', | ||
| 'maintainer': 'ABF OSIELL', | ||
| 'website': 'http://www.osiell.com', | ||
| 'depends': [ | ||
| 'base', | ||
| ], | ||
| 'data': [ | ||
| 'security/ir.model.access.csv', | ||
| 'data/ir_cron.xml', | ||
| 'views/role.xml', | ||
| 'views/user.xml', | ||
| ], | ||
| 'installable': True, | ||
| 'auto_install': False, | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <!-- Copyright 2016 ABF OSIELL <http://osiell.com> | ||
| License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> | ||
| <openerp> | ||
| <data noupdate="1"> | ||
|
|
||
| <record model="ir.cron" id="cron_update_users"> | ||
| <field name='name'>Update user roles</field> | ||
| <field name='interval_number'>3</field> | ||
| <field name='interval_type'>hours</field> | ||
| <field name="numbercall">-1</field> | ||
| <field name="active">True</field> | ||
| <field name="doall" eval="False" /> | ||
| <field name="model">res.users.role</field> | ||
| <field name="function">cron_update_users</field> | ||
| <field name="args">()</field> | ||
| </record> | ||
|
|
||
| </data> | ||
| </openerp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,189 @@ | ||
| # Translation of Odoo Server. | ||
| # This file contains the translation of the following modules: | ||
| # * base_user_role | ||
| # | ||
| msgid "" | ||
| msgstr "" | ||
| "Project-Id-Version: Odoo Server 8.0\n" | ||
| "Report-Msgid-Bugs-To: \n" | ||
| "POT-Creation-Date: 2016-11-18 11:58+0000\n" | ||
| "PO-Revision-Date: 2016-11-18 11:58+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" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,model_access:0 | ||
| msgid "Access Controls" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,menu_access:0 | ||
| msgid "Access Menu" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role.line,is_enabled:0 | ||
| msgid "Enabled" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,category_id:0 | ||
| msgid "Application" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,group_id:0 | ||
| msgid "Associated group" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,comment:0 | ||
| msgid "Comment" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,create_uid:0 | ||
| #: field:res.users.role.line,create_uid:0 | ||
| msgid "Created by" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,create_date:0 | ||
| #: field:res.users.role.line,create_date:0 | ||
| msgid "Created on" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,display_name:0 | ||
| #: field:res.users.role.line,display_name:0 | ||
| msgid "Display Name" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role.line,date_from:0 | ||
| msgid "From" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,full_name:0 | ||
| msgid "Group Name" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: view:res.users.role:base_user_role.view_res_users_role_form | ||
| msgid "Groups" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,id:0 | ||
| #: field:res.users.role.line,id:0 | ||
| msgid "ID" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,implied_ids:0 | ||
| msgid "Inherits" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,__last_update:0 | ||
| #: field:res.users.role.line,__last_update:0 | ||
| msgid "Last Modified on" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,write_uid:0 | ||
| #: field:res.users.role.line,write_uid:0 | ||
| msgid "Last Updated by" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,write_date:0 | ||
| #: field:res.users.role.line,write_date:0 | ||
| msgid "Last Updated on" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,name:0 | ||
| msgid "Name" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: view:res.users.role:base_user_role.view_res_users_role_form | ||
| #: view:res.users.role:base_user_role.view_res_users_role_tree | ||
| #: field:res.users.role.line,role_id:0 | ||
| msgid "Role" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users,role_line_ids:0 | ||
| msgid "Role lines" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: model:ir.actions.act_window,name:base_user_role.action_res_users_role_tree | ||
| #: model:ir.ui.menu,name:base_user_role.menu_action_res_users_role_tree | ||
| #: view:res.users:base_user_role.view_res_users_form_inherit | ||
| #: field:res.users,role_ids:0 | ||
| #: view:res.users.role:base_user_role.view_res_users_role_search | ||
| msgid "Roles" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,rule_groups:0 | ||
| msgid "Rules" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users,scoring:0 | ||
| msgid "Scoring (%)" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role.line,date_to:0 | ||
| msgid "To" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,trans_implied_ids:0 | ||
| msgid "Transitively inherits" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role.line,user_id:0 | ||
| msgid "User" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: model:ir.model,name:base_user_role.model_res_users_role | ||
| msgid "User role" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: model:ir.model,name:base_user_role.model_res_users | ||
| #: view:res.users.role:base_user_role.view_res_users_role_form | ||
| #: field:res.users.role,line_ids:0 | ||
| #: field:res.users.role,user_ids:0 | ||
| #: field:res.users.role,users:0 | ||
| msgid "Users" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: model:ir.model,name:base_user_role.model_res_users_role_line | ||
| msgid "Users associated to a role" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: help:res.users.role,implied_ids:0 | ||
| msgid "Users of this group automatically inherit those groups" | ||
| msgstr "" | ||
|
|
||
| #. module: base_user_role | ||
| #: field:res.users.role,view_access:0 | ||
| msgid "Views" | ||
| msgstr "" | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this key.
basedependency is implicit.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you should depend on your module at least in base, but base is implicit when depending on other module.