Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/routes_amazon_profit.py +8 -0
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v86",
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "fa8dcfdc4ebd (fa8dcfdc4ebd)",
|
| 3 |
"releases": [
|
| 4 |
{
|
| 5 |
"version": "v86",
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
fa8dcfdc4ebd (fa8dcfdc4ebd)
|
api/routes_amazon_profit.py
CHANGED
|
@@ -69,6 +69,14 @@ def _account_access(session, required_fields=amazon_profit_account.ACCOUNT_FIELD
|
|
| 69 |
if scope.row_scope_applies(session.user, key, st=session.runtime, defn=definition):
|
| 70 |
raise err(403, "account_scope_restricted", "Account totals require access to every Amazon SKU. Use the scoped table.")
|
| 71 |
visible = {field["key"] for field in fields}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
if not required_fields <= visible:
|
| 73 |
raise err(403, "account_fields_restricted", "Account totals require access to the Amazon profit and cost fields.")
|
| 74 |
return definition
|
|
|
|
| 69 |
if scope.row_scope_applies(session.user, key, st=session.runtime, defn=definition):
|
| 70 |
raise err(403, "account_scope_restricted", "Account totals require access to every Amazon SKU. Use the scoped table.")
|
| 71 |
visible = {field["key"] for field in fields}
|
| 72 |
+
# A declared column absent from a stale stored definition is judged by the wall, not refused.
|
| 73 |
+
stored = list(definition.get("fields") or [])
|
| 74 |
+
have = {field.get("key") for field in stored if isinstance(field, dict)}
|
| 75 |
+
absent = [dict(field) for field in amazon_profit.COMPUTED_FIELDS + amazon_profit.OWNED_FIELDS
|
| 76 |
+
+ amazon_profit.TRACK_FIELDS if field["key"] not in have]
|
| 77 |
+
if absent:
|
| 78 |
+
hidden = scope.hidden_keys(session.user, key, stored + absent, st=session.runtime)
|
| 79 |
+
visible |= {field["key"] for field in absent} - set(hidden)
|
| 80 |
if not required_fields <= visible:
|
| 81 |
raise err(403, "account_fields_restricted", "Account totals require access to the Amazon profit and cost fields.")
|
| 82 |
return definition
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
8fcf48bbd3ffcc9be24fe370d4f1f6136cc33730fa2f5aaeb9bec42997d0bf80
|