Skip to content

Commit

Permalink
Merge pull request #604 from adithyadinesh0412/notify-user-in-sessions
Browse files Browse the repository at this point in the history
mentee mentor list issue fixed
  • Loading branch information
rakeshSgr authored Feb 19, 2024
2 parents 3b62743 + 5f66495 commit fd701b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/services/mentees.js
Original file line number Diff line number Diff line change
Expand Up @@ -1227,10 +1227,11 @@ module.exports = class MenteesHelper {
*/
filter =
additionalFilter +
`AND (${userPolicyDetails.organization_id} = ANY("visible_to_organizations") AND "visibility" != 'CURRENT')`
`AND ( (${userPolicyDetails.organization_id} = ANY("visible_to_organizations") AND "visibility" != 'CURRENT')`

if (additionalFilter.length === 0)
filter += ` OR organization_id = ${userPolicyDetails.organization_id}`
filter += ` OR organization_id = ${userPolicyDetails.organization_id} )`
else filter += `)`
} else if (externalVisibilityPolicy === common.ALL) {
/**
* We need to check if mentor's visible_to_organizations contain the user organization_id and verify mentor's visibility is not current (if it is ALL and ASSOCIATED it is accessible)
Expand Down
5 changes: 3 additions & 2 deletions src/services/mentors.js
Original file line number Diff line number Diff line change
Expand Up @@ -915,10 +915,11 @@ module.exports = class MentorsHelper {

filter =
additionalFilter +
`AND (${userPolicyDetails.organization_id} = ANY("visible_to_organizations") AND "visibility" != 'CURRENT')`
`AND ( (${userPolicyDetails.organization_id} = ANY("visible_to_organizations") AND "visibility" != 'CURRENT')`

if (additionalFilter.length === 0)
filter += ` OR organization_id = ${userPolicyDetails.organization_id}`
filter += ` OR organization_id = ${userPolicyDetails.organization_id} )`
else filter += `)`
} else if (userPolicyDetails.external_mentor_visibility === common.ALL) {
/**
* We need to check if mentor's visible_to_organizations contain the user organization_id and verify mentor's visibility is not current (if it is ALL and ASSOCIATED it is accessible)
Expand Down

0 comments on commit fd701b7

Please sign in to comment.