Repository navigation
fix(ep): hide request link without read permission - #1062
TahaKhan998 wants to merge 1 commit into
Conversation
|
@TahaKhan998 what about the steps where the user doesnt have access and there is no request created yet or it is still pending? what do we show? |
heres what it looks like for the different roles:
record owner still sees the steps, just no buttons/links. community owner gets the buttons. referee cant open the restricted record until they have access |
c360978 to
4248fec
Compare
4248fec to
20b81d4
Compare
|
Caution Review failedAn error occurred during the review process. Please try again later. Walkthrough
Warning Some tools did not complete. Review the errors below.
|
| -#} | ||
| {%- if not show_record_management_menu %} | ||
| {%- set ca = get_committee_approval_state(record_ui, record) %} | ||
| {%- if ca and ca.community_enrolled and not ca.can_submit and not ca.is_public_approved_record %} |
There was a problem hiding this comment.
There is a duplication of logic and strings (like step_info) with CommitteeApprovalManageSection, which makes it error prone if we forget that we have to update it in 2 places.
was it decided that everybody should see this status, not just management?
What about having a new CommitteeApprovalSection which then has 2 components based on the access: CommitteeApprovalManageSection and CommitteeApprovalReadOnlySection (naming can be different)? and then the read-only part can be mounted for non-managers?
other option would be to extend get_committee_approval_state with these strings?
WDYT?
There was a problem hiding this comment.
yes after investigating, you're right. i went for the alternative solution you suggested because the status strings already belong on get_committee_approval_state (that helper is what feeds both the manage menu and the sidebar anyway). so now it builds status_only, and jinja + react just render that. same copy, no second place to update, no extra react mount.
and yeah, status for everyone was already decided: record owners/curators/members get the compact status-only view, managers keep the full workflow. no request yet = nothing shown.
20b81d4 to
7c27ca1
Compare
7c27ca1 to
25cdc0f
Compare


















closes #1027
record owners were seeing the ep approval request link even though they cant open the request (permission denied). step 3 also looked done for them after approval just because they cant create the public version.
now we only include the request link if the current user can actually read the request, and step 3 is only marked done when a public record exists.
Record not created yet:
Record after being published:
Owner of the community's view:

Owner of the record's view:

Summary by CodeRabbit