aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation/users
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-08-07 07:19:16 +0300
committerFrederick Muriuki Muriithi2023-08-07 09:26:11 +0300
commitc9f35e54d5d894051ceb446d1dce54915dcb20f6 (patch)
treec2bfc7bd6b7feab4b7418770f05e7d6ab43623da /gn_auth/auth/authorisation/users
parentb7f5cd0d788748559ca5e9768f3ea35d45442ef6 (diff)
downloadgn-auth-c9f35e54d5d894051ceb446d1dce54915dcb20f6.tar.gz
Update module name/path
Change from gn3 to gn_auth
Diffstat (limited to 'gn_auth/auth/authorisation/users')
-rw-r--r--gn_auth/auth/authorisation/users/admin/ui.py8
-rw-r--r--gn_auth/auth/authorisation/users/admin/views.py10
-rw-r--r--gn_auth/auth/authorisation/users/collections/models.py2
-rw-r--r--gn_auth/auth/authorisation/users/collections/views.py12
-rw-r--r--gn_auth/auth/authorisation/users/masquerade/models.py10
-rw-r--r--gn_auth/auth/authorisation/users/masquerade/views.py10
-rw-r--r--gn_auth/auth/authorisation/users/models.py10
-rw-r--r--gn_auth/auth/authorisation/users/views.py6
8 files changed, 34 insertions, 34 deletions
diff --git a/gn_auth/auth/authorisation/users/admin/ui.py b/gn_auth/auth/authorisation/users/admin/ui.py
index 242c7a6..4351a68 100644
--- a/gn_auth/auth/authorisation/users/admin/ui.py
+++ b/gn_auth/auth/authorisation/users/admin/ui.py
@@ -2,11 +2,11 @@
from functools import wraps
from flask import flash, url_for, redirect
-from gn3.auth.authentication.users import User
-from gn3.auth.db_utils import with_db_connection
-from gn3.auth.authorisation.roles.models import user_roles
+from gn_auth.auth.authentication.users import User
+from gn_auth.auth.db_utils import with_db_connection
+from gn_auth.auth.authorisation.roles.models import user_roles
-from gn3.session import logged_in, session_user, clear_session_info
+from gn_auth.session import logged_in, session_user, clear_session_info
def is_admin(func):
"""Verify user is a system admin."""
diff --git a/gn_auth/auth/authorisation/users/admin/views.py b/gn_auth/auth/authorisation/users/admin/views.py
index c9f1887..ab04f91 100644
--- a/gn_auth/auth/authorisation/users/admin/views.py
+++ b/gn_auth/auth/authorisation/users/admin/views.py
@@ -17,17 +17,17 @@ from flask import (
render_template)
-from gn3 import session
-from gn3.auth import db
-from gn3.auth.db_utils import with_db_connection
+from gn_auth import session
+from gn_auth.auth import db
+from gn_auth.auth.db_utils import with_db_connection
-from gn3.auth.authentication.oauth2.models.oauth2client import (
+from gn_auth.auth.authentication.oauth2.models.oauth2client import (
save_client,
OAuth2Client,
oauth2_clients,
client as oauth2_client,
delete_client as _delete_client)
-from gn3.auth.authentication.users import (
+from gn_auth.auth.authentication.users import (
User,
user_by_id,
valid_login,
diff --git a/gn_auth/auth/authorisation/users/collections/models.py b/gn_auth/auth/authorisation/users/collections/models.py
index 7577fa8..eb9b188 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 gn3.auth.authorisation.errors import InvalidData, NotFoundError
+from gn_auth.auth.authorisation.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 1fa25a3..3dcc10f 100644
--- a/gn_auth/auth/authorisation/users/collections/views.py
+++ b/gn_auth/auth/authorisation/users/collections/views.py
@@ -4,13 +4,13 @@ from uuid import UUID
from redis import Redis
from flask import jsonify, request, Response, Blueprint, current_app
-from gn3.auth import db
-from gn3.auth.db_utils import with_db_connection
-from gn3.auth.authorisation.checks import require_json
-from gn3.auth.authorisation.errors import NotFoundError
+from gn_auth.auth import db
+from gn_auth.auth.db_utils import with_db_connection
+from gn_auth.auth.authorisation.checks import require_json
+from gn_auth.auth.authorisation.errors import NotFoundError
-from gn3.auth.authentication.users import User, user_by_id
-from gn3.auth.authentication.oauth2.resource_server import require_oauth
+from gn_auth.auth.authentication.users import User, user_by_id
+from gn_auth.auth.authentication.oauth2.resource_server import require_oauth
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 9f24b6b..c45d761 100644
--- a/gn_auth/auth/authorisation/users/masquerade/models.py
+++ b/gn_auth/auth/authorisation/users/masquerade/models.py
@@ -5,13 +5,13 @@ from datetime import datetime
from flask import current_app as app
-from gn3.auth import db
+from gn_auth.auth import db
-from gn3.auth.authorisation.errors import ForbiddenAccess
-from gn3.auth.authorisation.roles.models import user_roles
+from gn_auth.auth.authorisation.errors import ForbiddenAccess
+from gn_auth.auth.authorisation.roles.models import user_roles
-from gn3.auth.authentication.users import User
-from gn3.auth.authentication.oauth2.models.oauth2token import (
+from gn_auth.auth.authentication.users import User
+from gn_auth.auth.authentication.oauth2.models.oauth2token import (
OAuth2Token, save_token)
__FIVE_HOURS__ = (60 * 60 * 5)
diff --git a/gn_auth/auth/authorisation/users/masquerade/views.py b/gn_auth/auth/authorisation/users/masquerade/views.py
index 43286a1..9e42945 100644
--- a/gn_auth/auth/authorisation/users/masquerade/views.py
+++ b/gn_auth/auth/authorisation/users/masquerade/views.py
@@ -4,12 +4,12 @@ from functools import partial
from flask import request, jsonify, Response, Blueprint
-from gn3.auth.db_utils import with_db_connection
-from gn3.auth.authorisation.errors import InvalidData
-from gn3.auth.authorisation.checks import require_json
+from gn_auth.auth.db_utils import with_db_connection
+from gn_auth.auth.authorisation.errors import InvalidData
+from gn_auth.auth.authorisation.checks import require_json
-from gn3.auth.authentication.users import user_by_id
-from gn3.auth.authentication.oauth2.resource_server import require_oauth
+from gn_auth.auth.authentication.users import user_by_id
+from gn_auth.auth.authentication.oauth2.resource_server import require_oauth
from .models import masquerade_as
diff --git a/gn_auth/auth/authorisation/users/models.py b/gn_auth/auth/authorisation/users/models.py
index 89c1d22..71fa390 100644
--- a/gn_auth/auth/authorisation/users/models.py
+++ b/gn_auth/auth/authorisation/users/models.py
@@ -2,12 +2,12 @@
import uuid
from functools import reduce
-from gn3.auth import db
-from gn3.auth.authorisation.roles.models import Role
-from gn3.auth.authorisation.checks import authorised_p
-from gn3.auth.authorisation.privileges import Privilege
+from gn_auth.auth import db
+from gn_auth.auth.authorisation.roles.models import Role
+from gn_auth.auth.authorisation.checks import authorised_p
+from gn_auth.auth.authorisation.privileges import Privilege
-from gn3.auth.authentication.users import User
+from gn_auth.auth.authentication.users import User
@authorised_p(
("system:user:list",),
diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py
index 826e222..7783dca 100644
--- a/gn_auth/auth/authorisation/users/views.py
+++ b/gn_auth/auth/authorisation/users/views.py
@@ -7,9 +7,9 @@ import sqlite3
from email_validator import validate_email, EmailNotValidError
from flask import request, jsonify, Response, Blueprint, current_app
-from gn3.auth import db
-from gn3.auth.dictify import dictify
-from gn3.auth.db_utils import with_db_connection
+from gn_auth.auth import db
+from gn_auth.auth.dictify import dictify
+from gn_auth.auth.db_utils import with_db_connection
from .models import list_users
from .masquerade.views import masq