OWASP / OWASP/Nest

Optimize My Mentorship page by conditionally skipping GetMyPrograms query

Open
#4,277 4 comments 0 reactions 2 assignees Claimed by @rofaida-ai View on GitHub
bug cat-reloaded-2026 enhancement
Dominant language
Python
Stars
451
Forks
702
Avg merge
22h 59m
Merged PRs (30d)
91

Description

Community & Support: [LinkedIn Group](https://www.linkedin.com/groups/14656108/) · [Slack #project-nest](https://owasp.slack.com/archives/project-nest)

Active project leaders: Arkadii Yakovets -- [GitHub](https://github.com/arkid15r/) · [LinkedIn](https://www.linkedin.com/in/arkid15r/) · [Slack](https://owasp.slack.com/team/U060W3NKLTF); Kate Golovanova -- [GitHub](https://github.com/kasya/) · [LinkedIn](https://www.linkedin.com/in/kate-golovanova/) · [Slack](https://owasp.slack.com/team/U07PWB1JZ6Z)

[Contributing](https://github.com/owasp/nest/blob/main/CONTRIBUTING.md) · [Code of Conduct](https://github.com/owasp/nest/blob/main/CODE_OF_CONDUCT.md) · [GSoC Mentors](https://github.com/owasp/nest/blob/main/MENTORS.md)

---

**Describe the bug**
The My Mentorship portal (/my/mentorship) executes the GetMyPrograms query for every user when the page loads, even if the user is not a project leader.

Although the backend safely returns an empty response (programs: []), the request is still triggered unnecessarily.

**Current Behavior**

- GetMyPrograms runs on page load for all users
- Non-leader users still trigger the query
- Response returns an empty program list

**Expected behavior**
The query should only run when the user is a verified project leader, preventing unnecessary API calls for users who cannot access mentorship programs.

**Are you going to work on fixing this?**

- [x] Yes
- [ ] No

**Screenshots**
Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.