You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.6 KiB

  1. .. image:: https://img.shields.io/badge/license-LGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
  3. :alt: License: LGPL-3
  4. ==============
  5. User Threshold
  6. ==============
  7. This module adds the ability to limit the amount of non-portal/public
  8. users that exist in the database and per-company.
  9. It adds a group named `User Threshold Managers` which are the only users
  10. who can alter the thresholds.
  11. This module also limits the ability of users to add membership
  12. to the manager group to pre-existing members. By default, `Administrator`
  13. is the only member of this group.
  14. Additionally, there is a flag that can be set on users so that they do not
  15. count towards the user threshold.
  16. Using the `USER_THRESHOLD_HIDE` environment variable, you can also hide the
  17. threshold exemption flag from users and the company setting for user
  18. threshold. Setting this flag will also remove threshold exemptions for any
  19. users who are not defined in the `USER_THRESHOLD_USER` environment variable.
  20. There are two modules available that also implement functionality similar to
  21. what is provided in this module but in a more abstract way. They are:
  22. https://github.com/it-projects-llc/access-addons/tree/10.0/access_limit_records_number
  23. https://github.com/it-projects-llc/access-addons/tree/10.0/access_restricted
  24. Usage
  25. =====
  26. A system parameter named `user.threshold.database` is added by default with
  27. the value of '0' (Unlimited). Set this value to the total number of users
  28. you wish to allow in the database.
  29. A field has been added to users to allow you to exempt them from the
  30. thresholds.
  31. A field has been added to all companies, which allows you to define the max
  32. number of users that the company can have.
  33. The following environment variables are available for your configuration ease:
  34. +---------------------+--------------------------------------------------------+
  35. | Name | Description |
  36. +=====================+========================================================+
  37. | USER_THRESHOLD_HIDE | Hide all threshold settings and default the exempt |
  38. | | users to those defined by the ``USER_THRESHOLD_USERS`` |
  39. | | variable. |
  40. +---------------------+--------------------------------------------------------+
  41. | USER_THRESHOLD_USER | White list of users who are exempt from the threshold. |
  42. +---------------------+--------------------------------------------------------+
  43. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  44. :alt: Try me on Runbot
  45. :target: https://runbot.odoo-community.org/runbot/149/10.0
  46. Bug Tracker
  47. ===========
  48. Bugs are tracked on `GitHub Issues
  49. <https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
  50. check there if your issue has already been reported. If you spotted it first,
  51. help us smash it by providing detailed and welcomed feedback.
  52. Credits
  53. =======
  54. Images
  55. ------
  56. * Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
  57. Contributors
  58. ------------
  59. * Ted Salmon <tsalmon@laslabs.com>
  60. * Dave Lasley <dave@laslabs.com>
  61. Maintainer
  62. ----------
  63. .. image:: https://odoo-community.org/logo.png
  64. :alt: Odoo Community Association
  65. :target: https://odoo-community.org
  66. This module is maintained by the OCA.
  67. OCA, or the Odoo Community Association, is a nonprofit organization whose
  68. mission is to support the collaborative development of Odoo features and
  69. promote its widespread use.
  70. To contribute to this module, please visit https://odoo-community.org.