feat(setting): Enable super admin to set ALL device models as global

sets is_global=true and creates device models in global organization

!12 closes #29
This commit is contained in:
2024-05-27 14:14:29 +09:30
parent 935e119e64
commit abbda7b400
5 changed files with 104 additions and 4 deletions

View File

@ -48,6 +48,12 @@ class AppSettings(AppSettingsCommonFields, SaveHistory):
related_name = 'owner_organization'
)
device_model_is_global = models.BooleanField (
verbose_name = 'All Device Models are global',
blank= False,
default = False,
)
software_is_global = models.BooleanField (
verbose_name = 'All Software is global',
blank= False,
@ -78,6 +84,7 @@ class AppSettings(AppSettingsCommonFields, SaveHistory):
raise ValidationError("Global Software must have a global organization")
__all__ = [
'device_model_is_global',
'software_is_global',
'software_categories_is_global',
'global_organization',