MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / get_role

Method get_role

web/setup.py:153–161  ·  view source on GitHub ↗
(role: str)

Source from the content-addressed store, hash-verified

151class ManageRoles:
152 @staticmethod
153 def get_role(role: str):
154 app = create_app(config.APP_NAME + '-cli')
155 usr = None
156 with app.test_request_context():
157 usr = Role.query.filter_by(name=role).first()
158
159 if not usr:
160 return None
161 return usr.id
162
163
164class ManageUsers:

Callers 3

update_userMethod · 0.80
update_external_userMethod · 0.80
create_userMethod · 0.80

Calls 2

create_appFunction · 0.90
firstMethod · 0.65

Tested by

no test coverage detected