fsanyoto commited on
Commit
4a51aa3
·
verified ·
1 Parent(s): f6bd82b

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "b9cf9ebba6",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "340e8a3363",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- b9cf9ebba6
 
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
- 672bfb8d5d5f73510156c19fa3f43231bc1d4adcc12d486831d562e9be8a4b62
 
1
+ 15eadc89193107a27b04d1829ea836b83055d78cb4ad1213cb1bf89156625b71