Commit 897b82a
authored
MOD-14124 Add RM_GetContextUser api (#85)
Add RM_GetContextUser api to retrieve the RedisModuleUser set via
RM_SetContextUser, allowing modules to access the user associated with
RM_Call ACL checks.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low-risk header-only API surface change; main concern is
ABI/compatibility for modules running against older Redis versions where
`RedisModule_GetContextUser` may be unavailable.
>
> **Overview**
> Adds a new module API entrypoint, `RedisModule_GetContextUser`, to
retrieve the `RedisModuleUser` previously set on a context via
`RedisModule_SetContextUser`.
>
> Updates `RedisModule_Init` to resolve and expose this function via
`REDISMODULE_GET_API(GetContextUser)` so modules can read the context
user (e.g., for ACL-aware `RM_Call` flows).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
3064ed1. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent c7b1e1f commit 897b82a
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1379 | 1379 | | |
1380 | 1380 | | |
1381 | 1381 | | |
| 1382 | + | |
1382 | 1383 | | |
1383 | 1384 | | |
1384 | 1385 | | |
| |||
1778 | 1779 | | |
1779 | 1780 | | |
1780 | 1781 | | |
| 1782 | + | |
1781 | 1783 | | |
1782 | 1784 | | |
1783 | 1785 | | |
| |||
0 commit comments