aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation/users
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-04-24 11:34:09 +0300
committerFrederick Muriuki Muriithi2024-04-24 11:34:09 +0300
commit6d61ef8de94fa87cb6ee31cc57f1f37dd04d097d (patch)
tree24234aa8fa1c4b6227322aa3c58e130697cb96bb /gn_auth/auth/authorisation/users
parentb317cd7e3684bf7c034ad0a1bb208d55fb87b164 (diff)
downloadgn-auth-6d61ef8de94fa87cb6ee31cc57f1f37dd04d097d.tar.gz
Move the errors module up one level to break circular dependencies.
Diffstat (limited to 'gn_auth/auth/authorisation/users')
-rw-r--r--gn_auth/auth/authorisation/users/admin/views.py2
-rw-r--r--gn_auth/auth/authorisation/users/collections/models.py2
-rw-r--r--gn_auth/auth/authorisation/users/collections/views.py3
-rw-r--r--gn_auth/auth/authorisation/users/masquerade/models.py4
-rw-r--r--gn_auth/auth/authorisation/users/masquerade/views.py4
-rw-r--r--gn_auth/auth/authorisation/users/views.py2
6 files changed, 9 insertions, 8 deletions
diff --git a/gn_auth/auth/authorisation/users/admin/views.py b/gn_auth/auth/authorisation/users/admin/views.py
index aed8b31..7ffee95 100644
--- a/gn_auth/auth/authorisation/users/admin/views.py
+++ b/gn_auth/auth/authorisation/users/admin/views.py
@@ -18,7 +18,7 @@ from flask import (
from gn_auth import session
-from gn_auth.auth.authorisation.errors import NotFoundError
+from gn_auth.auth.errors import NotFoundError
from ....db import sqlite3 as db
from ....db.sqlite3 import with_db_connection
diff --git a/gn_auth/auth/authorisation/users/collections/models.py b/gn_auth/auth/authorisation/users/collections/models.py
index 9397094..b4a24f3 100644
--- a/gn_auth/auth/authorisation/users/collections/models.py
+++ b/gn_auth/auth/authorisation/users/collections/models.py
@@ -6,7 +6,7 @@ from datetime import datetime
from redis import Redis
from email_validator import validate_email, EmailNotValidError
-from ...errors import InvalidData, NotFoundError
+from gn_auth.auth.errors import InvalidData, NotFoundError
from ..models import User
diff --git a/gn_auth/auth/authorisation/users/collections/views.py b/gn_auth/auth/authorisation/users/collections/views.py
index 6c68b35..eeae91d 100644
--- a/gn_auth/auth/authorisation/users/collections/views.py
+++ b/gn_auth/auth/authorisation/users/collections/views.py
@@ -4,6 +4,8 @@ from uuid import UUID
from redis import Redis
from flask import jsonify, request, Response, Blueprint, current_app
+from gn_auth.auth.errors import NotFoundError
+
from ....db import sqlite3 as db
from ....db.sqlite3 import with_db_connection
@@ -11,7 +13,6 @@ from ....authentication.users import User, user_by_id
from ....authentication.oauth2.resource_server import require_oauth
from ...checks import require_json
-from ...errors import NotFoundError
from .models import (
add_traits,
diff --git a/gn_auth/auth/authorisation/users/masquerade/models.py b/gn_auth/auth/authorisation/users/masquerade/models.py
index 86b9e53..57bc564 100644
--- a/gn_auth/auth/authorisation/users/masquerade/models.py
+++ b/gn_auth/auth/authorisation/users/masquerade/models.py
@@ -6,9 +6,9 @@ from datetime import datetime
from flask import current_app as app
-from ...errors import ForbiddenAccess
-from ...roles.models import user_roles
+from gn_auth.auth.errors import ForbiddenAccess
+from ...roles.models import user_roles
from ....db import sqlite3 as db
from ....authentication.users import User
from ....authentication.oauth2.models.oauth2token import (
diff --git a/gn_auth/auth/authorisation/users/masquerade/views.py b/gn_auth/auth/authorisation/users/masquerade/views.py
index b0464ba..276859a 100644
--- a/gn_auth/auth/authorisation/users/masquerade/views.py
+++ b/gn_auth/auth/authorisation/users/masquerade/views.py
@@ -5,9 +5,9 @@ from functools import partial
from flask import request, jsonify, Response, Blueprint
-from ...errors import InvalidData
-from ...checks import require_json
+from gn_auth.auth.errors import InvalidData
+from ...checks import require_json
from ....db.sqlite3 import with_db_connection
from ....authentication.users import user_by_id
from ....authentication.oauth2.resource_server import require_oauth
diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py
index 7a32292..9ea0c59 100644
--- a/gn_auth/auth/authorisation/users/views.py
+++ b/gn_auth/auth/authorisation/users/views.py
@@ -14,7 +14,7 @@ from gn_auth.auth.authorisation.resources.models import (
user_resources as _user_resources)
from gn_auth.auth.authorisation.roles.models import (
assign_default_roles, user_roles as _user_roles)
-from gn_auth.auth.authorisation.errors import (
+from gn_auth.auth.errors import (
NotFoundError, UsernameError, PasswordError, UserRegistrationError)
from gn_auth.auth.authorisation.resources.groups.models import (
user_group as _user_group)