Skip to content

Commit

Permalink
[BUG] fix grant landing page to show 404 if no AE profiles have grant…
Browse files Browse the repository at this point in the history
… set to visible #622 (#636)
  • Loading branch information
UcDust authored Oct 23, 2024
1 parent 952bcdd commit e9e5a6e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class AppGrant extends Mixin(LitElement)

// Invisible grants still have resolvable landing pages. When the grant visibility has been changed, the expected behavior is:
// 1. If there are no public relationships, the grant landing page should return a 404 for all users, including the owner of the grant
let hasPublicRelationships = (grantGraph?.relatedBy || []).some(r => (r['inheres_in'] && r['is-visible']) || r['@id'].includes('#roleof_'));
let hasPublicRelationships = (grantGraph?.relatedBy || []).some(r => r['inheres_in'] && r['is-visible']);
if( !hasPublicRelationships ) {
this.dispatchEvent(
new CustomEvent("show-404", {})
Expand Down

0 comments on commit e9e5a6e

Please sign in to comment.