feat(setting): Enable super admin to set ALL software categories as global

sets is_global=true and creates software categories in global organization

!12 closes #30
This commit is contained in:
2024-05-27 13:59:40 +09:30
parent da0d3a816d
commit 935e119e64
7 changed files with 133 additions and 5 deletions

View File

@ -54,9 +54,15 @@ class AppSettings(AppSettingsCommonFields, SaveHistory):
default = False,
)
software_categories_is_global = models.BooleanField (
verbose_name = 'All Software Categories are global',
blank= False,
default = False,
)
global_organization = models.ForeignKey(
Organization,
on_delete=models.CASCADE,
on_delete=models.SET_DEFAULT,
blank= True,
default = None,
null = True,
@ -73,5 +79,6 @@ class AppSettings(AppSettingsCommonFields, SaveHistory):
__all__ = [
'software_is_global',
'software_categories_is_global',
'global_organization',
]