MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / role_save

Function role_save

web/pgadmin/tools/user_management/__init__.py:475–493  ·  view source on GitHub ↗

Args: id: Role id

(id)

Source from the content-addressed store, hash-verified

473@blueprint.route('/role/<int:id>', methods=['DELETE'], endpoint='role_delete')
474@roles_required('Administrator')
475def role_save(id):
476 """
477
478 Args:
479 id: Role id
480
481 """
482
483 if request.method == 'DELETE':
484 return delete_role(id)
485
486 data = request.form if request.form else json.loads(
487 request.data
488 )
489
490 if 'id' not in data:
491 return create_role(data)
492 else:
493 return update_role(data['id'], data)
494
495
496@blueprint.route(

Callers

nothing calls this directly

Calls 3

update_roleFunction · 0.85
delete_roleFunction · 0.70
create_roleFunction · 0.70

Tested by

no test coverage detected