-
Notifications
You must be signed in to change notification settings - Fork 27
feat(ep-approval): add read-only flag #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -222,9 +222,31 @@ def get_committee_approval_state(record_ui, record=None): | |
| pass | ||
|
|
||
| open_request = _get_open_request(record_id, parent_record) | ||
| can_submit = _check_can_manage_community(community_id) | ||
| approved_report_number = ea.get("reportnumber") | ||
| can_create_public = _check_can_create_public(can_submit, ea, record_id) | ||
|
|
||
| community_read_only = community_config.get("read_only", False) | ||
| if community_read_only: | ||
| if not approved_report_number: | ||
| return { | ||
| "can_submit": False, | ||
|
Comment on lines
+230
to
+231
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you explain why this dict need to be returned in this form? Out of curiosity, I want to understand how it works
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. basically this is a UI serialization on what is needed to render the component. |
||
| "can_create_public": False, | ||
| "approval_label": _approval_label(community_config), | ||
| "committee_name": _committee_name(community_config), | ||
| "community_enrolled": False, | ||
| "is_public_approved_record": False, | ||
| "open_request": None, | ||
| "approved_report_number": None, | ||
| "approval_date": None, | ||
| "committee_approval": {}, | ||
| "draft_record_id": None, | ||
| "can_view_reviewed_version": False, | ||
| "receiver_group": None, | ||
| } | ||
| can_submit = False | ||
| can_create_public = False | ||
| else: | ||
| can_submit = _check_can_manage_community(community_id) | ||
| can_create_public = _check_can_create_public(can_submit, ea, record_id) | ||
|
|
||
| cern_scientific_community_id = current_app.config.get( | ||
| "CDS_CERN_SCIENTIFIC_COMMUNITY_ID" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can add this as well to LEP experiments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to add this in our openshift environments too, lets document it in CERNDocumentServer/cds-migrator-kit#600