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.

95 lines
3.1 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. | Name | Description |
  35. |------|-------------|
  36. | USER_THRESHOLD_HIDE | Hide all threshold settings and default the exempt users to those defined by the USER_THRESHOLD_USERS variable
  37. | USER_THRESHOLD_USER | White list of users who are exempt from the threshold.
  38. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  39. :alt: Try me on Runbot
  40. :target: https://runbot.odoo-community.org/runbot/149/10.0
  41. Bug Tracker
  42. ===========
  43. Bugs are tracked on `GitHub Issues
  44. `<https://github.com/OCA/server-tools/issues>`_. In case of trouble, please
  45. check there if your issue has already been reported. If you spotted it first,
  46. help us smash it by providing detailed and welcomed feedback.
  47. Credits
  48. =======
  49. Images
  50. ------
  51. * Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
  52. Contributors
  53. ------------
  54. * Ted Salmon <tsalmon@laslabs.com>
  55. Maintainer
  56. ----------
  57. .. image:: https://odoo-community.org/logo.png
  58. :alt: Odoo Community Association
  59. :target: https://odoo-community.org
  60. This module is maintained by the OCA.
  61. OCA, or the Odoo Community Association, is a nonprofit organization whose
  62. mission is to support the collaborative development of Odoo features and
  63. promote its widespread use.
  64. To contribute to this module, please visit https://odoo-community.org.