Skip to content

Commit

Permalink
Merge branch 'main' into move-iterator-iso-time-2
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell authored Dec 18, 2023
2 parents c1aa6f2 + ae00482 commit 70ed2c2
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 72 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
scan-build -o ~/scan-build-report cmake --build build
- name: Upload scan-build report
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: scan-build-report
path: ~/scan-build-report/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cmake -DSKIP_SRC=1 ..
make doc-gmp
- name: Upload GMP documentation artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: gmp.html
path: build/doc/gmp.html
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# build between init and analyze ...
Expand All @@ -42,4 +42,4 @@ jobs:
cmake -DCMAKE_BUILD_TYPE=Debug ..
make install
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
25 changes: 11 additions & 14 deletions src/manage_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1117,42 +1117,39 @@ acl_where_owned_user (const char *user_id, const char *user_sql,
{
gchar *clause;
clause
= g_strdup_printf ("OR EXISTS"
" (SELECT id FROM %spermissions_subject"
" WHERE resource = %ss%s.id"
" AND resource_type = '%s'"
= g_strdup_printf ("OR %ss%s.id IN"
" (SELECT resource FROM %spermissions_subject"
" WHERE resource_type = '%s'"
" AND resource_location = %i"
" AND (%s))",
with_prefix ? with_prefix : "",
type,
get->trash && strcmp (type, "task") ? "_trash" : "",
with_prefix ? with_prefix : "",
type,
get->trash ? LOCATION_TRASH : LOCATION_TABLE,
permission_or->str);

if (strcmp (type, "report") == 0)
permission_clause
= g_strdup_printf ("%s"
" OR EXISTS"
" (SELECT id FROM %spermissions_subject"
" WHERE resource = reports%s.task"
" AND resource_type = 'task'"
" OR reports%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);
else if (strcmp (type, "result") == 0)
permission_clause
= g_strdup_printf ("%s"
" OR EXISTS"
" OR results%s.task IN"
" (SELECT id FROM %spermissions_subject"
" WHERE resource = results%s.task"
" AND resource_type = 'task'"
" 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
Loading

0 comments on commit 70ed2c2

Please sign in to comment.