pum 1.1.17__py3-none-any.whl → 1.1.18__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pum/role_manager.py +11 -6
- {pum-1.1.17.dist-info → pum-1.1.18.dist-info}/METADATA +1 -1
- {pum-1.1.17.dist-info → pum-1.1.18.dist-info}/RECORD +7 -7
- {pum-1.1.17.dist-info → pum-1.1.18.dist-info}/WHEEL +0 -0
- {pum-1.1.17.dist-info → pum-1.1.18.dist-info}/entry_points.txt +0 -0
- {pum-1.1.17.dist-info → pum-1.1.18.dist-info}/licenses/LICENSE +0 -0
- {pum-1.1.17.dist-info → pum-1.1.18.dist-info}/top_level.txt +0 -0
pum/role_manager.py
CHANGED
|
@@ -125,7 +125,7 @@ class Role:
|
|
|
125
125
|
self.inherit = inherit
|
|
126
126
|
self.description = description
|
|
127
127
|
|
|
128
|
-
def permissions(self):
|
|
128
|
+
def permissions(self) -> list[Permission]:
|
|
129
129
|
"""
|
|
130
130
|
Returns the list of permissions associated with the role.
|
|
131
131
|
"""
|
|
@@ -138,11 +138,16 @@ class Role:
|
|
|
138
138
|
Returns:
|
|
139
139
|
bool: True if the role exists, False otherwise.
|
|
140
140
|
"""
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
return (
|
|
142
|
+
SqlContent("SELECT 1 FROM pg_roles WHERE rolname = {name}")
|
|
143
|
+
.execute(
|
|
144
|
+
connection=connection,
|
|
145
|
+
commit=False,
|
|
146
|
+
parameters={"name": psycopg.sql.Literal(self.name)},
|
|
147
|
+
)
|
|
148
|
+
.fetchone()
|
|
149
|
+
is not None
|
|
150
|
+
)
|
|
146
151
|
|
|
147
152
|
def create(
|
|
148
153
|
self, connection: psycopg.Connection, grant: bool = False, commit: bool = False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pum
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.18
|
|
4
4
|
Summary: Pum stands for "Postgres Upgrades Manager". It is a Database migration management tool very similar to flyway-db or Liquibase, based on metadata tables.
|
|
5
5
|
Author-email: Denis Rouzaud <denis@opengis.ch>
|
|
6
6
|
License-Expression: GPL-2.0-or-later
|
|
@@ -10,13 +10,13 @@ pum/hook.py,sha256=5MrVa6Xr0o28RfsXylGDatlM_vOKfKtGJmhYx8crC94,9541
|
|
|
10
10
|
pum/info.py,sha256=CGj-Lt4Y2l2ymAl3OFqCWfJD5xZF4aaUSztAiSKwgE4,1395
|
|
11
11
|
pum/parameter.py,sha256=qdbWk3WZc419AW-qwGMxlgc-7GEhdwIoPBnDk6UsVZU,2485
|
|
12
12
|
pum/pum_config.py,sha256=bnL3rxgd7YNLD9u8Yyl7lNPxt7YtRXC0cpDP-l1Rw9w,11245
|
|
13
|
-
pum/role_manager.py,sha256=
|
|
13
|
+
pum/role_manager.py,sha256=sV-pbjczxCTRWPVszrks7V5MIqFSbZtmbPreE7gx13k,10236
|
|
14
14
|
pum/schema_migrations.py,sha256=MCA40pCptwWeoZQuZb3zyvbLDU7I1YdRbr1Hgpe9hYg,10481
|
|
15
15
|
pum/sql_content.py,sha256=-0h3caJlvkyEjZwjPVrKh5ZYaDctC-5lklBvZ-zgRzA,10620
|
|
16
16
|
pum/upgrader.py,sha256=5o3d-RoZoUifw4POHRe2map2ik1FFe8SagGSa1reQUg,6333
|
|
17
|
-
pum-1.1.
|
|
18
|
-
pum-1.1.
|
|
19
|
-
pum-1.1.
|
|
20
|
-
pum-1.1.
|
|
21
|
-
pum-1.1.
|
|
22
|
-
pum-1.1.
|
|
17
|
+
pum-1.1.18.dist-info/licenses/LICENSE,sha256=2ylvL381vKOhdO-w6zkrOxe9lLNBhRQpo9_0EbHC_HM,18046
|
|
18
|
+
pum-1.1.18.dist-info/METADATA,sha256=L38-1E36Js19sLxeAFi_bPx6rbe8BPvqZ-dBXTJu0OQ,3139
|
|
19
|
+
pum-1.1.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
20
|
+
pum-1.1.18.dist-info/entry_points.txt,sha256=U6dmxSpKs1Pe9vWiR29VPhJMDjrmZeJCSxvfLGR8BD4,36
|
|
21
|
+
pum-1.1.18.dist-info/top_level.txt,sha256=ddiI4HLBhY6ql-NNm0Ez0JhoOHdWDIzrHeCdHmmagcc,4
|
|
22
|
+
pum-1.1.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|