# Checking User Roles from Vision Component

**URL:** <https://forum.inductiveautomation.com/t/checking-user-roles-from-vision-component/102378>\
**Category:** Module Development\
**Tags:** vision\
**Created:** [February 14, 2025, 6:42pm UTC](https://forum.inductiveautomation.com/t/checking-user-roles-from-vision-component/102378 "2025-02-14T18:42:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Porter\_Ellis](https://avatars.discourse-cdn.com/v4/letter/p/ed8c4c/32.png) [@Porter\_Ellis](https://forum.inductiveautomation.com/u/Porter_Ellis)\
**Post date:** [February 14, 2025, 6:42pm UTC](https://forum.inductiveautomation.com/t/checking-user-roles-from-vision-component/102378/1 "2025-02-14T18:42:19Z")

</div>

In my custom vision component, I have an editable text field. However, I would like to control whether this text field is editable depending on the logged in user's roles. Right now I am using the string contained in [System]User/RolesString. I was just wondering if there is a more built-in way to access the client session information, and subsequently the user roles? Perhaps a client context method? My component extends AbstractVisionComponent and thus possesses the 'context' field, which is a VisionClientContext object.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 14, 2025, 6:59pm UTC](https://forum.inductiveautomation.com/t/checking-user-roles-from-vision-component/102378/2 "2025-02-14T18:59:00Z")

</div>

[`GatewayConnectionManager.getInstance().getRoles()`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.45/com/inductiveautomation/ignition/client/gateway_interface/GatewayConnection.html)
