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

Function has_project_permissions_for_export

shared/export/export_utils.py:47–55  ·  view source on GitHub ↗
(export, project_string_id, session)

Source from the content-addressed store, hash-verified

45
46
47def has_project_permissions_for_export(export, project_string_id, session):
48 log = regular_log.default()
49 project = Project.get(session, project_string_id)
50 # Theory is that if a user has access to project
51 # They have access to download from project
52 if export.project_id != project.id:
53 log['error']['project_permissions'] = 'Permission error, invalid project export match'
54
55 return log
56
57
58def is_export_completed(export):

Callers 1

Calls 1

getMethod · 0.45

Tested by

no test coverage detected