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

Function api_project_update

default/methods/project/project_update.py:13–49  ·  view source on GitHub ↗

Considerations 1) Security 2) Recovery * removing a user from a projects permissions effectively hides it...

(project_string_id)

Source from the content-addressed store, hash-verified

11 apis_user_list = ['api_enabled_builder', 'security_email_verified'])
12@limiter.limit("20 per day")
13def api_project_update(project_string_id):
14 """
15 Considerations
16 1) Security
17 2) Recovery
18
19 * removing a user from a projects permissions effectively hides it...
20
21
22 """
23
24 spec_list = [{'mode': str}]
25
26 log, input, untrusted_input = regular_input.master(request = request,
27 spec_list = spec_list)
28 if len(log["error"].keys()) >= 1:
29 return jsonify(log = log), 400
30
31 with sessionMaker.session_scope() as session:
32
33 user = User.get(session = session)
34 project = Project.get(session, project_string_id)
35
36 log = project_update_core(
37 session = session,
38 project = project,
39 mode = input['mode'],
40 log = log,
41 member = user.member)
42
43 if len(log["error"].keys()) >= 1:
44 return jsonify(log = log), 400
45
46 log['success'] = True
47 return jsonify(
48 log = log,
49 project = project.serialize()), 200
50
51
52def project_update_core(session,

Callers

nothing calls this directly

Calls 3

project_update_coreFunction · 0.85
getMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected