autonomous-app 0.2.12__py3-none-any.whl → 0.2.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- autonomous/__init__.py +1 -1
- autonomous/auth/autoauth.py +2 -0
- autonomous/auth/user.py +2 -2
- autonomous/db/table.py +7 -5
- {autonomous_app-0.2.12.dist-info → autonomous_app-0.2.14.dist-info}/METADATA +1 -1
- {autonomous_app-0.2.12.dist-info → autonomous_app-0.2.14.dist-info}/RECORD +9 -9
- {autonomous_app-0.2.12.dist-info → autonomous_app-0.2.14.dist-info}/LICENSE +0 -0
- {autonomous_app-0.2.12.dist-info → autonomous_app-0.2.14.dist-info}/WHEEL +0 -0
- {autonomous_app-0.2.12.dist-info → autonomous_app-0.2.14.dist-info}/top_level.txt +0 -0
autonomous/__init__.py
CHANGED
autonomous/auth/autoauth.py
CHANGED
autonomous/auth/user.py
CHANGED
|
@@ -76,11 +76,11 @@ class AutoUser(AutoModel):
|
|
|
76
76
|
"""
|
|
77
77
|
Returns True if the user is a guest, False otherwise.
|
|
78
78
|
"""
|
|
79
|
-
return self.
|
|
79
|
+
return not self.is_authenticated or self.role == "guest"
|
|
80
80
|
|
|
81
81
|
@property
|
|
82
82
|
def is_admin(self):
|
|
83
83
|
"""
|
|
84
84
|
Returns True if the user is a guest, False otherwise.
|
|
85
85
|
"""
|
|
86
|
-
return self.role == "admin"
|
|
86
|
+
return self.is_authenticated and self.role == "admin"
|
autonomous/db/table.py
CHANGED
|
@@ -123,11 +123,13 @@ class Table:
|
|
|
123
123
|
return objs
|
|
124
124
|
|
|
125
125
|
def get(self, _id):
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
o = None
|
|
127
|
+
try:
|
|
128
|
+
if o := self._db.find_one({"_id": ObjectId(_id)}):
|
|
129
|
+
o["_id"] = str(o["_id"])
|
|
130
|
+
except Exception as e:
|
|
131
|
+
log(e, f"Object '{_id}' not found in '{self.name}'")
|
|
132
|
+
return o
|
|
131
133
|
|
|
132
134
|
def all(self):
|
|
133
135
|
objs = []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: autonomous-app
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.14
|
|
4
4
|
Summary: Containerized application framework built on Flask with additional libraries and tools for rapid development of web applications.
|
|
5
5
|
Author-email: Steven A Moore <samoore@binghamton.edu>
|
|
6
6
|
License: MIT License
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
autonomous/__init__.py,sha256
|
|
1
|
+
autonomous/__init__.py,sha256=-eZrlcPU9pDa47zNs5iHpU5pTojIwNupC4YKIlW3A88,87
|
|
2
2
|
autonomous/cli.py,sha256=z4AaGeWNW_uBLFAHng0J_lfS9v3fXemK1PeT85u4Eo4,42
|
|
3
3
|
autonomous/logger.py,sha256=hDX3gvbcWiGPvA8pfarih3xHS4aHG_NuNkF8PQfq_pM,1844
|
|
4
4
|
autonomous/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
autonomous/ai/oaiagent.py,sha256=OWlSjvo8pEo6e5wrgvEGOL06AMKHECVW4ccnekaeZBU,7128
|
|
6
6
|
autonomous/auth/__init__.py,sha256=IW5tQ8VYwHIbDfMYA0wYgx4PprwcjUWV4EoIJ8HTlMU,161
|
|
7
|
-
autonomous/auth/autoauth.py,sha256=
|
|
7
|
+
autonomous/auth/autoauth.py,sha256=a_5dZICdbdokxtHdihkwCcWI-d1TofGKV8llKbuI9xA,3685
|
|
8
8
|
autonomous/auth/github.py,sha256=dHf84bJdV9rXGcvRLzWCPW9CvuA-VEmqYi_QQFwd2kY,886
|
|
9
9
|
autonomous/auth/google.py,sha256=cHmqbyNEPTKipc3WkYcD1XPOyqcWEFW0Ks4qJYmGvPw,1049
|
|
10
|
-
autonomous/auth/user.py,sha256=
|
|
10
|
+
autonomous/auth/user.py,sha256=eDOIhGuWjzhyAxlZkt6lw74Ykxt2TluDanW17D-eZmc,2389
|
|
11
11
|
autonomous/db/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
12
12
|
autonomous/db/autodb.py,sha256=GifrahGJ2dAi8jQOiMIh0pgktcbuKt_1kAXIjKlKVZY,2376
|
|
13
|
-
autonomous/db/table.py,sha256=
|
|
13
|
+
autonomous/db/table.py,sha256=QHIc5zC9KxScbbB6DLoyOj2wOrjujC33WmwX9qE8_U8,4651
|
|
14
14
|
autonomous/errors/__init__.py,sha256=OruWG9IkAF4LN-OAo5c2K9Dnds4oZFJJQHKaXbQaWnA,59
|
|
15
15
|
autonomous/errors/danglingreferenceerror.py,sha256=obfNjpn2vsyK4ak-UuuwFTMVzecs1SaeFPshOvnukS8,275
|
|
16
16
|
autonomous/model/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
@@ -29,8 +29,8 @@ autonomous/storage/version_control/GHVersionControl.py,sha256=VIhVRxe6gJgozFWyhy
|
|
|
29
29
|
autonomous/storage/version_control/__init__.py,sha256=tP0bAWYl1RwBRi62HsIidmgyqHuSlCUqwGuKUKKRugc,117
|
|
30
30
|
autonomous/tasks/__init__.py,sha256=pn7iZ14MhcHUdzcLkfkd4-45wgPP0tXahAz_cFgb_Tg,32
|
|
31
31
|
autonomous/tasks/autotask.py,sha256=_WQ8w1LyV2FVJ0Ct0FoF9q1W8ClXfS57-omnBb0LNWE,4910
|
|
32
|
-
autonomous_app-0.2.
|
|
33
|
-
autonomous_app-0.2.
|
|
34
|
-
autonomous_app-0.2.
|
|
35
|
-
autonomous_app-0.2.
|
|
36
|
-
autonomous_app-0.2.
|
|
32
|
+
autonomous_app-0.2.14.dist-info/LICENSE,sha256=-PHHSuDRkodHo3PEdMkDtoIdmLAOomMq6lsLaOetU8g,1076
|
|
33
|
+
autonomous_app-0.2.14.dist-info/METADATA,sha256=f-mxSDGpmsXA74bGFNh6U-b-rATuN4Xz9jYNOYTtPAo,4229
|
|
34
|
+
autonomous_app-0.2.14.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
35
|
+
autonomous_app-0.2.14.dist-info/top_level.txt,sha256=ZyxWWDdbvZekF3UFunxl4BQsVDb_FOW3eTn0vun_jb4,11
|
|
36
|
+
autonomous_app-0.2.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|