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,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "340e8a3363",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
340e8a3363
|
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 |
+
15eadc89193107a27b04d1829ea836b83055d78cb4ad1213cb1bf89156625b71
|