mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
Added a max_hosts field to Organization
in order to optionally set a limit to the number of hosts an organization that is sharing a license is allowed to manage. related #1542
This commit is contained in:
parent
658e5f0fc8
commit
5e13da62a4
@ -10,6 +10,7 @@ from django.db.models import Q
|
||||
from django.contrib.auth.models import User
|
||||
from django.contrib.sessions.models import Session
|
||||
from django.utils.timezone import now as tz_now
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
# AWX
|
||||
@ -42,6 +43,12 @@ class Organization(CommonModel, NotificationFieldsModel, ResourceMixin, CustomVi
|
||||
'InstanceGroup',
|
||||
blank=True,
|
||||
)
|
||||
max_hosts = models.PositiveIntegerField(
|
||||
blank=True,
|
||||
default=0,
|
||||
help_text=_('Maximum number of hosts allowed to be managed by this organization.'),
|
||||
)
|
||||
|
||||
admin_role = ImplicitRoleField(
|
||||
parent_role='singleton:' + ROLE_SINGLETON_SYSTEM_ADMINISTRATOR,
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user