Skip to content

Commit

Permalink
Merge pull request #2132 from greenbone/GEA-477_user_cant_see_results
Browse files Browse the repository at this point in the history
Fix: Handle permission clause for result permissions.
  • Loading branch information
jhelmold authored Feb 9, 2024
2 parents e66a7ac + c214ddc commit e9a6d99
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/manage_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,13 +1143,14 @@ 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 results%s.task IN"
" OR EXISTS"
" (SELECT id FROM %spermissions_subject"
" WHERE resource_type = 'task'"
" WHERE resource = results%s.task"
" AND resource_type = 'task'"
" AND (%s))",
clause,
get->trash ? "_trash" : "",
with_prefix ? with_prefix : "",
get->trash ? "_trash" : "",
permission_or->str);

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

0 comments on commit e9a6d99

Please sign in to comment.