Permissions
hypha.apply.projects.reports.permissions
¶
update_project_reports
¶
Determines if a user can update project reports.
Parameters:
-
role
βThe role of the user.
-
user
βThe user attempting to update project reports.
-
project
βThe project whose reports are being updated.
Returns:
-
bool
(bool
) βTrue if the user can update project reports, False otherwise.
Conditions
- User must be authenticated
- Project status must be INVOICING_AND_REPORTING
- User must be a StaffAdmin or the project owner
Source code in hypha/apply/projects/reports/permissions.py
update_report_config
¶
Determines if a user can update the report configuration for a project.
Parameters:
-
role
βThe role of the user.
-
user
βThe user attempting to update the report configuration.
-
project
βThe project whose report configuration is being updated.
Returns:
-
bool
(bool
) βTrue if the user can update the report configuration, False otherwise.
Conditions
- User must be authenticated
- Project status must be INVOICING_AND_REPORTING
- Disallow if only one time reporting is allowed and is up to date
- User must have apply staff permissions
Source code in hypha/apply/projects/reports/permissions.py
view_report
¶
Determines if a user can view a report.
Parameters:
-
role
βThe role of the user.
-
user
βThe user attempting to view the report.
-
report
βThe report being accessed.
Returns:
-
bool
(bool
) βTrue if the user can view the report, False otherwise.
Conditions
- User must be authenticated
- Project status must be in COMPLETE, CLOSING, or INVOICING_AND_REPORTING
- Report must be current and not skipped
- User must be apply staff or the project owner
Source code in hypha/apply/projects/reports/permissions.py
update_report
¶
Determines if a user can update a report.
Parameters:
-
role
βThe role of the user.
-
user
βThe user attempting to update the report.
-
report
βThe report being updated.
Returns:
-
bool
(bool
) βTrue if the user can update the report, False otherwise.
Conditions
- User must be authenticated
- Project status must be INVOICING_AND_REPORTING
- Report must not be skipped
- Report must be in a state that can be submitted
- User must be apply staff or the project owner (and report not current)