fix bug privacity

This commit is contained in:
Cayo Puigdefabregas 2022-11-30 15:26:16 +01:00
parent fe9c2c1c2d
commit 341a7b2034
1 changed files with 3 additions and 1 deletions

View File

@ -141,6 +141,7 @@ class ErasureListView(DeviceListMixin):
) )
if orphans: if orphans:
schema = app.config.get('SCHEMA') schema = app.config.get('SCHEMA')
_user = g.user.id
sql = f""" sql = f"""
select action.id from {schema}.action as action select action.id from {schema}.action as action
inner join {schema}.erase_basic as erase inner join {schema}.erase_basic as erase
@ -149,7 +150,8 @@ class ErasureListView(DeviceListMixin):
on device.id=action.parent_id on device.id=action.parent_id
inner join {schema}.placeholder as placeholder inner join {schema}.placeholder as placeholder
on placeholder.binding_id=device.id on placeholder.binding_id=device.id
where action.parent_id is null or placeholder.kangaroo=true where (action.parent_id is null or placeholder.kangaroo=true)
and action.author_id='{_user}'
""" """
ids = (e[0] for e in db.session.execute(sql)) ids = (e[0] for e in db.session.execute(sql))
erasure = ( erasure = (