about summary refs log tree commit diff
path: root/gn3/auth/authentication/checks.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/auth/authentication/checks.py')
-rw-r--r--gn3/auth/authentication/checks.py14
1 files changed, 0 insertions, 14 deletions
diff --git a/gn3/auth/authentication/checks.py b/gn3/auth/authentication/checks.py
deleted file mode 100644
index 63b0752..0000000
--- a/gn3/auth/authentication/checks.py
+++ /dev/null
@@ -1,14 +0,0 @@
-"""Functions to check for user authentication."""
-
-from flask import g
-
-from .exceptions import AuthenticationError
-
-def authenticated_p(func):
-    """Decorator for functions requiring authentication."""
-    def __authenticated__(*args, **kwargs):
-        user = g.user if hasattr(g, "user") else False
-        if user:
-            return func(*args, **kwargs)
-        raise AuthenticationError("You need to be authenticated")
-    return __authenticated__