Package com.axelor.ai
Class AiPermissionServiceImpl
java.lang.Object
com.axelor.ai.AiPermissionServiceImpl
- All Implemented Interfaces:
AiPermissionService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailableAgents(User user) Enabled non-internal agents visible to the user, ordered bysortOrder, name.booleancanAccessAgent(User user, AiAgent agent) True iff the user may chat with the given agent.booleanhasAnyAiAccess(User user) True iff the user can open the chat UI — i.e.booleanTrue iff the user is considered an AI administrator.resolveDefaultAgent(User user) The user's default agent: the agent flaggedisDefault=trueif it is accessible, else the first accessible agent, elsenull.
-
Constructor Details
-
AiPermissionServiceImpl
public AiPermissionServiceImpl()
-
-
Method Details
-
isAiAdmin
Description copied from interface:AiPermissionServiceTrue iff the user is considered an AI administrator.- Specified by:
isAiAdminin interfaceAiPermissionService
-
hasAnyAiAccess
Description copied from interface:AiPermissionServiceTrue iff the user can open the chat UI — i.e. admin, or has at least one role referenced by an enabledAiAgent.- Specified by:
hasAnyAiAccessin interfaceAiPermissionService
-
canAccessAgent
Description copied from interface:AiPermissionServiceTrue iff the user may chat with the given agent. Admins always pass. For non-admins, the agent must have at least one role in common with the user's direct or group roles; an agent with no roles assigned is inaccessible to non-admins.- Specified by:
canAccessAgentin interfaceAiPermissionService
-
availableAgents
Description copied from interface:AiPermissionServiceEnabled non-internal agents visible to the user, ordered bysortOrder, name.- Specified by:
availableAgentsin interfaceAiPermissionService
-
resolveDefaultAgent
Description copied from interface:AiPermissionServiceThe user's default agent: the agent flaggedisDefault=trueif it is accessible, else the first accessible agent, elsenull.- Specified by:
resolveDefaultAgentin interfaceAiPermissionService
-