Skip to content

Store user data in request #244

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

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

Store user data in request #244

wants to merge 33 commits into from

Conversation

simonLeary42
Copy link
Collaborator

@simonLeary42 simonLeary42 commented Jun 7, 2025

Problem:

When redis is flushed, the names/emails/orgs of all nonexistent users disappear. Any attempt to approve requests made by these users will result in a white screen of death because the portal doesn't know what name/email/org to write to LDAP.

Solution:

Any access to name/email/org for a nonexistent user is now an error. name/email/org are stored with each request.

Notes:

The request creations now have assertions that $USER and $SSO match. This is to prevent an admin from viewing as another user and accidentally submitting a request for that user with the admin's name/email/org.

@simonLeary42 simonLeary42 marked this pull request as draft June 7, 2025 17:54
@simonLeary42 simonLeary42 force-pushed the request-name-volatile branch from b39ba6e to 0b75c4d Compare June 7, 2025 19:12
@simonLeary42 simonLeary42 marked this pull request as ready for review June 7, 2025 21:12
@simonLeary42 simonLeary42 requested a review from bryank-cs June 7, 2025 21:12
@simonLeary42 simonLeary42 marked this pull request as draft June 7, 2025 21:19
@simonLeary42 simonLeary42 marked this pull request as ready for review June 7, 2025 21:49
@@ -130,10 +147,26 @@ public function removeRequests($dest = self::REQUEST_BECOME_PI)
$this->delete(self::TABLE_REQS, ["request_for" => $dest]);
}

public function requestExists($requestor, $dest = self::REQUEST_BECOME_PI)
public function getRequest($user, $dest)
{
$results = $this->search(self::TABLE_REQS, ["request_for" => $dest]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doesn't this search also filter by $user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants