refactor(access): Rename model Organization -> Tenant

ref: #756 #505
This commit is contained in:
2025-05-14 23:22:48 +09:30
parent 2e49de8573
commit 2d7335ff85
348 changed files with 1107 additions and 651 deletions

View File

@ -5,7 +5,7 @@ from django.core.exceptions import ObjectDoesNotExist
from rest_framework import exceptions
from rest_framework.permissions import DjangoObjectPermissions
from access.models.tenancy import Organization, TenancyObject
from access.models.tenancy import Tenant, TenancyObject
from core import exceptions as centurion_exceptions
@ -14,10 +14,10 @@ from core import exceptions as centurion_exceptions
class OrganizationPermissionMixin(
DjangoObjectPermissions,
):
"""Organization Permission Mixin
"""Tenant Permission Mixin
This class is to be used as the permission class for API `Views`/`ViewSets`.
In combination with the `OrganizationPermissionsMixin`, permission checking
In combination with the `TenantPermissionsMixin`, permission checking
will be done to ensure the user has the correct permissions to perform the
CRUD operation.
@ -166,7 +166,7 @@ class OrganizationPermissionMixin(
raise centurion_exceptions.PermissionDenied()
obj_organization: Organization = view.get_obj_organization(
obj_organization: Tenant = view.get_obj_organization(
request = request
)