From 3315a4da81a2dd7ab8ae7e925fa257a949155969 Mon Sep 17 00:00:00 2001 From: Anne Haley Date: Mon, 30 Sep 2024 20:16:39 +0000 Subject: [PATCH] refactor: rename `guardian.py` -> `access_control.py` --- uvdat/core/rest/{guardian.py => access_control.py} | 0 uvdat/core/rest/chart.py | 2 +- uvdat/core/rest/dataset.py | 2 +- uvdat/core/rest/file_item.py | 2 +- uvdat/core/rest/map_layers.py | 2 +- uvdat/core/rest/network.py | 2 +- uvdat/core/rest/project.py | 2 +- uvdat/core/rest/regions.py | 2 +- uvdat/core/rest/simulations.py | 6 +++++- uvdat/core/tasks/regions.py | 2 +- 10 files changed, 13 insertions(+), 9 deletions(-) rename uvdat/core/rest/{guardian.py => access_control.py} (100%) diff --git a/uvdat/core/rest/guardian.py b/uvdat/core/rest/access_control.py similarity index 100% rename from uvdat/core/rest/guardian.py rename to uvdat/core/rest/access_control.py diff --git a/uvdat/core/rest/chart.py b/uvdat/core/rest/chart.py index ba9d7cb9..12cf5c81 100644 --- a/uvdat/core/rest/chart.py +++ b/uvdat/core/rest/chart.py @@ -3,7 +3,7 @@ from rest_framework.viewsets import ModelViewSet from uvdat.core.models import Chart -from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission +from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission from uvdat.core.rest.serializers import ChartSerializer diff --git a/uvdat/core/rest/dataset.py b/uvdat/core/rest/dataset.py index ba761f44..24b24402 100644 --- a/uvdat/core/rest/dataset.py +++ b/uvdat/core/rest/dataset.py @@ -6,7 +6,7 @@ from rest_framework.viewsets import ModelViewSet from uvdat.core.models import Dataset, NetworkEdge, NetworkNode -from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission +from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission from uvdat.core.rest.serializers import ( DatasetSerializer, NetworkEdgeSerializer, diff --git a/uvdat/core/rest/file_item.py b/uvdat/core/rest/file_item.py index 70608978..51a2054e 100644 --- a/uvdat/core/rest/file_item.py +++ b/uvdat/core/rest/file_item.py @@ -1,7 +1,7 @@ from rest_framework.viewsets import ModelViewSet from uvdat.core.models import FileItem -from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission +from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission from uvdat.core.rest.serializers import FileItemSerializer diff --git a/uvdat/core/rest/map_layers.py b/uvdat/core/rest/map_layers.py index fbdf3c75..39a53ce0 100644 --- a/uvdat/core/rest/map_layers.py +++ b/uvdat/core/rest/map_layers.py @@ -8,7 +8,7 @@ from rest_framework.viewsets import ModelViewSet from uvdat.core.models import RasterMapLayer, VectorMapLayer -from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission +from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission from uvdat.core.rest.serializers import ( RasterMapLayerSerializer, VectorMapLayerDetailSerializer, diff --git a/uvdat/core/rest/network.py b/uvdat/core/rest/network.py index 8e41926c..a3ca45dc 100644 --- a/uvdat/core/rest/network.py +++ b/uvdat/core/rest/network.py @@ -1,7 +1,7 @@ from rest_framework.viewsets import ModelViewSet from uvdat.core.models import Network, NetworkEdge, NetworkNode -from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission +from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission from uvdat.core.rest.serializers import ( NetworkEdgeSerializer, NetworkNodeSerializer, diff --git a/uvdat/core/rest/project.py b/uvdat/core/rest/project.py index e48d84d8..880329ef 100644 --- a/uvdat/core/rest/project.py +++ b/uvdat/core/rest/project.py @@ -3,7 +3,7 @@ from rest_framework.viewsets import ModelViewSet from uvdat.core.models import Project -from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission +from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission from uvdat.core.rest.serializers import ProjectSerializer from uvdat.core.tasks.osmnx import load_roads diff --git a/uvdat/core/rest/regions.py b/uvdat/core/rest/regions.py index 97f967d4..00781227 100644 --- a/uvdat/core/rest/regions.py +++ b/uvdat/core/rest/regions.py @@ -6,7 +6,7 @@ from rest_framework.viewsets import GenericViewSet, mixins from uvdat.core.models import DerivedRegion, SourceRegion -from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission +from uvdat.core.rest.access_control import GuardianFilter, GuardianPermission from uvdat.core.tasks.regions import DerivedRegionCreationError, create_derived_region from .serializers import ( diff --git a/uvdat/core/rest/simulations.py b/uvdat/core/rest/simulations.py index 581c15e0..643da989 100644 --- a/uvdat/core/rest/simulations.py +++ b/uvdat/core/rest/simulations.py @@ -9,7 +9,11 @@ from uvdat.core.models import Project from uvdat.core.models.simulations import AVAILABLE_SIMULATIONS, SimulationResult -from uvdat.core.rest.guardian import GuardianFilter, GuardianPermission, filter_queryset_by_projects +from uvdat.core.rest.access_control import ( + GuardianFilter, + GuardianPermission, + filter_queryset_by_projects, +) import uvdat.core.rest.serializers as uvdat_serializers diff --git a/uvdat/core/tasks/regions.py b/uvdat/core/tasks/regions.py index 196a964e..80b8f7c4 100644 --- a/uvdat/core/tasks/regions.py +++ b/uvdat/core/tasks/regions.py @@ -8,7 +8,7 @@ import geopandas from uvdat.core.models import DerivedRegion, Project, SourceRegion, VectorMapLayer -from uvdat.core.rest.guardian import filter_queryset_by_projects +from uvdat.core.rest.access_control import filter_queryset_by_projects from uvdat.core.tasks.map_layers import save_vector_features