Skip to content
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

Add fallback to logged in user properties in route config #14579

Open
jdalsem opened this issue Mar 14, 2024 · 0 comments
Open

Add fallback to logged in user properties in route config #14579

jdalsem opened this issue Mar 14, 2024 · 0 comments
Labels
Milestone

Comments

@jdalsem
Copy link
Member

jdalsem commented Mar 14, 2024

We have different implementations at the moment where $username or $guid is part of the url path in the route configuration.

Sometimes it is optional and we then cannot add gatekeeper middleware because we implement default behaviour in the resource -> we mostly default to logged in user and then check if it is a user.

It would make things easier if the route username/guid is required, but can default to the logged in user. That way we can use middleware and have consistency in default logic.

One additional pattern (for example with /settings/user/foo_non_existing) is where a username is required, but is not required to be a valid user. This pattern needs to disappear. Passing an invalid username should result in a 404 (not fallback to another logged in user).

@jdalsem jdalsem added this to the Elgg 6 milestone Mar 14, 2024
@jdalsem jdalsem modified the milestones: Elgg 6, 6.x Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant