Skip to content

Commit

Permalink
Initial Commit: Fix List Users Shared With Me and Mine
Browse files Browse the repository at this point in the history
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
  • Loading branch information
rodneyosodo committed Jul 10, 2023
1 parent 7ffc14b commit 8140926
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion users/clients/postgres/clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ func pageQuery(pm mfclients.Page) (string, error) {

// For listing clients that the specified client owns and that are shared with the specified client
if pm.Owner != "" && pm.SharedBy != "" {
query = append(query, "(c.owner_id = :owner_id OR EXISTS (SELECT 1 FROM policies WHERE subject = :shared_by AND :action=ANY(actions) AND object = policies.object))")
query = append(query, "(c.owner_id = :owner_id OR (policies.object IN (SELECT object FROM policies WHERE subject = :shared_by AND :action=ANY(actions))))")

Check warning on line 442 in users/clients/postgres/clients.go

View check run for this annotation

Codecov / codecov/patch

users/clients/postgres/clients.go#L442

Added line #L442 was not covered by tests
}
// For listing clients that the specified client is shared with
if pm.SharedBy != "" && pm.Owner == "" {
Expand Down

0 comments on commit 8140926

Please sign in to comment.