Deploy AIOS web (React glide grid + FastAPI slice)
Browse files- RELEASES.json +1 -1
- VERSION +1 -1
- api/registry_source.py +4 -1
- api/routes_sheet.py +14 -2
- web/public/AIOS_DEPLOY_RECEIPT +1 -1
RELEASES.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
{
|
| 2 |
-
"current": "
|
| 3 |
"releases": []
|
| 4 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"current": "3373cd349",
|
| 3 |
"releases": []
|
| 4 |
}
|
VERSION
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
3373cd349
|
api/registry_source.py
CHANGED
|
@@ -643,7 +643,10 @@ def canonical_grid(session, cur, table_key, *, needed=None, metric_window=None):
|
|
| 643 |
spec = rel.registry_grid_spec(cur, f'{table_key}__at_{slot}', typed, rows(), bulk=True)
|
| 644 |
if join_agent:
|
| 645 |
cur.execute(f'UPDATE "{spec["table"]}" AS grid SET agent_id=partner.agent_id FROM res_partner partner WHERE grid.pid=partner.id')
|
| 646 |
-
|
|
|
|
|
|
|
|
|
|
| 647 |
|
| 648 |
|
| 649 |
def canonical_page(session, cur, table_key, ids, *, related=None):
|
|
|
|
| 643 |
spec = rel.registry_grid_spec(cur, f'{table_key}__at_{slot}', typed, rows(), bulk=True)
|
| 644 |
if join_agent:
|
| 645 |
cur.execute(f'UPDATE "{spec["table"]}" AS grid SET agent_id=partner.agent_id FROM res_partner partner WHERE grid.pid=partner.id')
|
| 646 |
+
scope_fields = (g.get('_permission_scope') or {}).get('fields', fields)
|
| 647 |
+
return cur, dict(spec, fields=fields, scope_applied=True,
|
| 648 |
+
scope_fields=tuple(f['key'] for f in scope_fields),
|
| 649 |
+
bounded=tuple(bounded), unbounded=unbounded), rot._filter_columns(spec, typed)
|
| 650 |
|
| 651 |
|
| 652 |
def canonical_page(session, cur, table_key, ids, *, related=None):
|
api/routes_sheet.py
CHANGED
|
@@ -5750,6 +5750,16 @@ def _binding_related_entry(session, database, name):
|
|
| 5750 |
return entry
|
| 5751 |
|
| 5752 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5753 |
def _binding_related_query(session, database, entry, cur, spec, columns, *, fields, window=None):
|
| 5754 |
"""Materialise the far side on the near cursor, then hand metadata to the compiler."""
|
| 5755 |
from core import perm_scope, relations
|
|
@@ -5796,6 +5806,7 @@ def _binding_related_query(session, database, entry, cur, spec, columns, *, fiel
|
|
| 5796 |
raise err(409, "relation_cursor_mismatch",
|
| 5797 |
f"Relationship '{name}' cannot be queried on the same live connection as "
|
| 5798 |
f"'{database}'. Retry after both databases share a connection.")
|
|
|
|
| 5799 |
hidden = perm_scope.hidden_keys(session.user, target, rspec.get("fields") or [],
|
| 5800 |
st=session.runtime)
|
| 5801 |
# The far-side wall compiles against the full map: a wall column is often hidden from its reader.
|
|
@@ -5940,11 +5951,12 @@ def _resolve_binding(session: Session, raw_binding, *, today=None, view_memo=Non
|
|
| 5940 |
cur, spec, cols = _mirror(session)(database, metric_window=window, needed=needed)
|
| 5941 |
cols = dict(cols)
|
| 5942 |
if spec.get("scope_applied"):
|
| 5943 |
-
wall_nodes, wall_conj =
|
| 5944 |
unreadable = (sheet_mod.filter_columns_named(scope_nodes) - set(cols)
|
| 5945 |
- sheet_mod.related_filter_ids(scope_nodes))
|
| 5946 |
field = binding["aggregate"].get("field")
|
| 5947 |
-
|
|
|
|
| 5948 |
unreadable.add(field)
|
| 5949 |
if unreadable:
|
| 5950 |
declared = {field.get("key") for field in spec.get("declared_fields", [])}
|
|
|
|
| 5750 |
return entry
|
| 5751 |
|
| 5752 |
|
| 5753 |
+
def _remaining_row_wall(spec, nodes, conj):
|
| 5754 |
+
"""Trust a scoped source only when its declared wall vocabulary covers every operand."""
|
| 5755 |
+
if not spec.get("scope_applied"):
|
| 5756 |
+
return nodes, conj
|
| 5757 |
+
from modules import sheet as sheet_mod
|
| 5758 |
+
if "scope_fields" in spec and sheet_mod.filter_columns_named(nodes) - set(spec["scope_fields"]):
|
| 5759 |
+
raise err(409, "scope_not_applicable", "Your row restriction cannot be applied to this database. Ask an administrator to review it.")
|
| 5760 |
+
return [], "and"
|
| 5761 |
+
|
| 5762 |
+
|
| 5763 |
def _binding_related_query(session, database, entry, cur, spec, columns, *, fields, window=None):
|
| 5764 |
"""Materialise the far side on the near cursor, then hand metadata to the compiler."""
|
| 5765 |
from core import perm_scope, relations
|
|
|
|
| 5806 |
raise err(409, "relation_cursor_mismatch",
|
| 5807 |
f"Relationship '{name}' cannot be queried on the same live connection as "
|
| 5808 |
f"'{database}'. Retry after both databases share a connection.")
|
| 5809 |
+
wall_nodes, wall_conj = _remaining_row_wall(rspec, wall_nodes, wall_conj)
|
| 5810 |
hidden = perm_scope.hidden_keys(session.user, target, rspec.get("fields") or [],
|
| 5811 |
st=session.runtime)
|
| 5812 |
# The far-side wall compiles against the full map: a wall column is often hidden from its reader.
|
|
|
|
| 5951 |
cur, spec, cols = _mirror(session)(database, metric_window=window, needed=needed)
|
| 5952 |
cols = dict(cols)
|
| 5953 |
if spec.get("scope_applied"):
|
| 5954 |
+
wall_nodes, wall_conj = _remaining_row_wall(spec, wall_nodes, wall_conj)
|
| 5955 |
unreadable = (sheet_mod.filter_columns_named(scope_nodes) - set(cols)
|
| 5956 |
- sheet_mod.related_filter_ids(scope_nodes))
|
| 5957 |
field = binding["aggregate"].get("field")
|
| 5958 |
+
known_fields = {f.get("key") for f in spec.get("fields", [])}
|
| 5959 |
+
if field and field not in cols and ("declared_fields" in spec or field in known_fields):
|
| 5960 |
unreadable.add(field)
|
| 5961 |
if unreadable:
|
| 5962 |
declared = {field.get("key") for field in spec.get("declared_fields", [])}
|
web/public/AIOS_DEPLOY_RECEIPT
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
|
|
|
|
| 1 |
+
cf7a28fd68c0037511be512421c8987496d6d4895ce11b9c53332f8ad0ec2a99
|