StaticClearClears the AIEngineBase cache. Useful when permissions have been modified. This forces a reload of all cached metadata including permissions.
StaticGetGets all agents that a user has access to with a specific permission level. Uses cached metadata from AIEngineBase instead of querying database.
The user to check permissions for
The minimum permission level required ('view', 'run', 'edit', or 'delete')
Array of agents the user can access with the specified permission
StaticGetGets the aggregate permissions for a user on a specific agent. Implements hierarchical permission logic:
Default behavior when no permission records exist:
Checks ownership first, then combines all matching user and role permissions.
The ID of the agent
The user to check permissions for
Object containing all effective permissions and ownership status
StaticHasChecks if a user has a specific permission for an agent.
The ID of the agent to check
The user to check permissions for
The permission level to check ('view', 'run', 'edit', or 'delete')
True if the user has the specified permission
StaticRefreshRefreshes the AIEngineBase cache to pick up permission changes.
The user context for server-side operations
Helper class for managing AI Agent permissions. Provides methods to check user permissions, get accessible agents, and uses AIEngineBase cached metadata.