Skip to content

Commit

Permalink
Fix: Change permission clause for result permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhelmold committed Feb 9, 2024
1 parent c214ddc commit 41bc890
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/manage_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,14 +1143,13 @@ acl_where_owned_user (const char *user_id, const char *user_sql,
else if (strcmp (type, "result") == 0)
permission_clause
= g_strdup_printf ("%s"
" OR EXISTS"
" (SELECT id FROM %spermissions_subject"
" WHERE resource = results%s.task"
" AND resource_type = 'task'"
" OR results%s.task IN"
" (SELECT resource FROM %spermissions_subject"
" WHERE resource_type = 'task'"
" AND (%s))",
clause,
with_prefix ? with_prefix : "",
get->trash ? "_trash" : "",
with_prefix ? with_prefix : "",
permission_or->str);

if ((strcmp (type, "report") == 0)
Expand Down

0 comments on commit 41bc890

Please sign in to comment.