fsanyoto commited on
Commit
9c91770
·
verified ·
1 Parent(s): 03b7aa0

Deploy AIOS web (React glide grid + FastAPI slice)

Browse files
RELEASES.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
- "current": "e8852c1 (e8852c1)",
3
  "releases": []
4
  }
 
1
  {
2
+ "current": "e454dec (e454dec)",
3
  "releases": []
4
  }
VERSION CHANGED
@@ -1 +1 @@
1
- e8852c1 (e8852c1)
 
1
+ e454dec (e454dec)
platform/core/grid_events.py CHANGED
@@ -885,6 +885,28 @@ def _shared_folder_record(fid, folder):
885
  return rec
886
 
887
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
888
  def _granted_views(ctx, uname):
889
  """{view_id: STAMPED view} for every view GRANTED to `uname` by name (wave 21, item 9, C1).
890
 
@@ -1821,9 +1843,8 @@ def handle_one(event, ctx):
1821
  if _foreign and _foreign[0] != uname:
1822
  _o_uname, _stored = _foreign
1823
  if not admin:
1824
- import core.shares as _shares
1825
- if _shares.role_for('view', view_id, uname,
1826
- st=getattr(_tops(ctx), 'st', None)) != 'edit':
1827
  ctx.out.toast = ('That view is shared with you read-only. Ask its '
1828
  'owner for edit access.')
1829
  return False
 
885
  return rec
886
 
887
 
888
+ def _shared_view_role(tops, view_id, owner, uname, st=None):
889
+ """`'edit'` | `'view'` | `None`: the role `uname` holds on `owner`'s View, resolved exactly
890
+ the way `_granted_views` projects it.
891
+
892
+ ⭐⭐ D-3520 (hotfix 2026-09-29). A DIRECT View grant decides, in both directions; only a View
893
+ with no direct grant for `uname` takes the role of the folder its owner filed it in. The save
894
+ door used to ask the direct grant alone, so a folder shared Can edit projected every View in
895
+ it as `sharedRole: 'edit'` and then refused each save as read-only (Naomi's four folders,
896
+ twenty Views, no direct grants).
897
+ """
898
+ import core.shares as shares
899
+ direct = shares.role_for('view', view_id, uname, st=st)
900
+ if direct:
901
+ return direct
902
+ finder = getattr(tops, 'folder_of_view', None)
903
+ fid = finder(owner, view_id) if callable(finder) else None
904
+ if not fid:
905
+ return None
906
+ role = shares.role_for('folder', fid, uname, st=st)
907
+ return role if role in ('view', 'edit') else None
908
+
909
+
910
  def _granted_views(ctx, uname):
911
  """{view_id: STAMPED view} for every view GRANTED to `uname` by name (wave 21, item 9, C1).
912
 
 
1843
  if _foreign and _foreign[0] != uname:
1844
  _o_uname, _stored = _foreign
1845
  if not admin:
1846
+ if _shared_view_role(_tops(ctx), view_id, _o_uname, uname,
1847
+ st=getattr(_tops(ctx), 'st', None)) != 'edit':
 
1848
  ctx.out.toast = ('That view is shared with you read-only. Ask its '
1849
  'owner for edit access.')
1850
  return False
platform/core/table_store.py CHANGED
@@ -732,6 +732,33 @@ class TableStore:
732
  return str(username), dict(hit), inside
733
  return None
734
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
735
  # ---------------------------------------------------------------- read
736
  def workspace(self, username, consume_corrections=True, include_document=False):
737
  """One user's durable workspace: always the full three-strata shape."""
 
732
  return str(username), dict(hit), inside
733
  return None
734
 
735
+ def folder_of_view(self, owner, view_id):
736
+ """The id of the VIEWS folder `owner` filed `view_id` in, else None.
737
+
738
+ ⭐ D-3520 (hotfix 2026-09-29): the write door's half of `find_folder`. It reads the SAME
739
+ surface-first `itemFolders['views']` map and answers only for a folder row the owner
740
+ still holds, so the save door and the projection agree on which folder a View sits in
741
+ (a stale item pointing at a deleted folder is no folder, exactly as `find_folder` has it).
742
+ """
743
+ who = str(owner or '').strip()
744
+ vid = str(view_id or '').strip()
745
+ if not who or not vid or who in RESERVED_MEMBERS:
746
+ return None
747
+ try:
748
+ data = self._st.get(self.table_key) or {}
749
+ except Exception:
750
+ return None
751
+ ws = data.get(who)
752
+ if not isinstance(ws, dict):
753
+ return None
754
+ placed = (ws.get('itemFolders') or {}).get('views') or {}
755
+ fid = str(placed.get(vid) or '').strip() if isinstance(placed, dict) else ''
756
+ if not fid:
757
+ return None
758
+ rows = (ws.get('folders') or {}).get('views') or []
759
+ held = any(isinstance(f, dict) and str(f.get('id') or '') == fid for f in rows)
760
+ return fid if held else None
761
+
762
  # ---------------------------------------------------------------- read
763
  def workspace(self, username, consume_corrections=True, include_document=False):
764
  """One user's durable workspace: always the full three-strata shape."""
web/public/AIOS_DEPLOY_RECEIPT CHANGED
@@ -1 +1 @@
1
- 582df42de7ef910c21713f215f488aa4d39e92ceea68ba0bc1282461fc07bf1a
 
1
+ 283087dedfe0488f85ba23beaaf1222010922133299bb9d8171e2722c8f59598