MCPcopy Index your code
hub / github.com/diffgram/diffgram / share_view_list_api

Function share_view_list_api

default/methods/share/share.py:88–106  ·  view source on GitHub ↗

Returns list of user permissions for project

(project_string_id)

Source from the content-addressed store, hash-verified

86 methods = ['GET'])
87@Project_permissions.user_has_project(["admin", "Editor", "Viewer"])
88def share_view_list_api(project_string_id):
89 """
90 Returns list of user permissions for project
91 """
92
93 with sessionMaker.session_scope() as session:
94 project = Project.get(session, project_string_id)
95
96 members_list = project.regenerate_member_list()
97
98 auth_api_list = Auth_api.list_by_project(session, project_string_id)
99
100 # CAREFUL does permission here match with route permission?
101 # ie allow view, than can't show client secret from auth_api
102 for auth_api in auth_api_list:
103 members_list.append(auth_api.serialize())
104
105 return jsonify(success = True,
106 members_list = members_list), 200
107
108
109class Share_Project():

Callers

nothing calls this directly

Calls 4

list_by_projectMethod · 0.80
getMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected