File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
lib/charms/postgresql_k8s/v0 Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 35
35
36
36
# Increment this PATCH version before using `charmcraft publish-lib` or reset
37
37
# to 0 if you are raising the major API version
38
- LIBPATCH = 51
38
+ LIBPATCH = 53
39
39
40
40
# Groups to distinguish HBA access
41
41
ACCESS_GROUP_IDENTITY = "identity_access"
@@ -672,7 +672,9 @@ def list_users_from_relation(self) -> Set[str]:
672
672
try :
673
673
with self ._connect_to_database () as connection , connection .cursor () as cursor :
674
674
cursor .execute (
675
- "SELECT usename FROM pg_catalog.pg_user WHERE usename LIKE 'relation_id_%';"
675
+ "SELECT usename "
676
+ "FROM pg_catalog.pg_user "
677
+ "WHERE usename LIKE 'relation_id_%' OR usename LIKE 'relation-%';"
676
678
)
677
679
usernames = cursor .fetchall ()
678
680
return {username [0 ] for username in usernames }
Original file line number Diff line number Diff line change @@ -208,7 +208,11 @@ def test_grant_relation_access_group_memberships(harness):
208
208
harness .charm .postgresql .grant_relation_access_group_memberships ()
209
209
210
210
execute .assert_has_calls ([
211
- call ("SELECT usename FROM pg_catalog.pg_user WHERE usename LIKE 'relation_id_%';" ),
211
+ call (
212
+ "SELECT usename "
213
+ "FROM pg_catalog.pg_user "
214
+ "WHERE usename LIKE 'relation_id_%' OR usename LIKE 'relation-%';"
215
+ ),
212
216
])
213
217
214
218
You can’t perform that action at this time.
0 commit comments