Skip to content

V14: Fix null ref exception in current user permission endpoint#16286

Merged
Zeegaan merged 2 commits intov14/devfrom
v14/fix/fix-current-user-permissions
May 15, 2024
Merged

V14: Fix null ref exception in current user permission endpoint#16286
Zeegaan merged 2 commits intov14/devfrom
v14/fix/fix-current-user-permissions

Conversation

@nikolajlauridsen
Copy link
Contributor

Given an invalid content key, the current user endpoint currently throws a null ref exception, this is because the entity gotten from the entity service is null, I've added a guard that prevents this, and instead returns a 404, aligning with the document and media versions of the endpoint.

Testing

The /umbraco/management/api/v1/user/current/permissions should not throw a null ref exception when given an invalid guide, but instead a not found.

@nikolajlauridsen nikolajlauridsen added the project/bellissima AKA "the new backoffice" label May 14, 2024
@Zeegaan Zeegaan merged commit bdd231c into v14/dev May 15, 2024
@Zeegaan Zeegaan deleted the v14/fix/fix-current-user-permissions branch May 15, 2024 12:23
@Zeegaan Zeegaan added release/14.0.0-rc4 and removed project/bellissima AKA "the new backoffice" labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants