public abstract class AbstractConversationPermissionCommand extends AbstractDmnBasedPermissionHelper<Conversation>
Modifier and Type | Field and Description |
---|---|
protected EngageEngineConfiguration |
engageEngineConfiguration |
protected Collection<String> |
userGroupKeys |
protected String |
userId |
protected String |
userTenantId |
NONE_VALUE, OUTPUT_KEY_ERROR_MESSAGE, OUTPUT_KEY_ERROR_MESSAGE_CODE, OUTPUT_KEY_GROUP_NEEDED, OUTPUT_KEY_PERMISSION
Constructor and Description |
---|
AbstractConversationPermissionCommand(EngageEngineConfiguration engageEngineConfiguration,
String userId,
Collection<String> userGroupKeys,
String userTenantId) |
Modifier and Type | Method and Description |
---|---|
protected Optional<String> |
checkBasicConversationAccess(CommandContext commandContext,
String userId,
Conversation conversation,
ParticipantType participantType)
Basic conversation access check if the participant type has already been resolved.
|
protected Map<String,Object> |
createRuleInputForDefaultModel(String userId,
AuthorizedAction action,
Conversation scopedObject,
Map<String,Object> detailedRuleInput,
CommandContext commandContext) |
ParticipantType |
evaluateMainParticipantType(ConversationEntity conversation)
Evaluates the participant type of user within the specified conversation.
|
ParticipantType |
evaluateMainParticipantType(String userId,
Collection<String> userGroupKeys,
ConversationEntity conversation)
Evaluates the participant type of the given user within the specified conversation.
|
protected Optional<String> |
evaluatePermissionsAndProcessResult(String tenantId,
AuthorizedAction action,
Conversation scopedObject,
Map<String,Object> ruleInput,
String decisionModelKey,
String globalErrorMessageCode,
CommandContext commandContext) |
protected String |
getDecisionKeyDefaultPermissions() |
protected String |
getTenantId(Conversation conversation) |
evaluateDefaultPermissionOutput, evaluatePermissionRuleOutput, evaluatePermissionsAndProcessResult, executeAndLogPermissionModel, getEmptyListOnNullValue, getGroups, isGroupMember, isUserMemberOfGroup, isUserType, processErrorMessage, renderErrorMessage
protected final EngageEngineConfiguration engageEngineConfiguration
protected String userId
protected Collection<String> userGroupKeys
protected String userTenantId
public AbstractConversationPermissionCommand(EngageEngineConfiguration engageEngineConfiguration, String userId, Collection<String> userGroupKeys, String userTenantId)
protected Optional<String> checkBasicConversationAccess(CommandContext commandContext, String userId, Conversation conversation, ParticipantType participantType)
protected String getTenantId(Conversation conversation)
getTenantId
in class AbstractDmnBasedPermissionHelper<Conversation>
public ParticipantType evaluateMainParticipantType(ConversationEntity conversation)
conversation
- the conversation for which the participant type is evaluatedpublic ParticipantType evaluateMainParticipantType(String userId, Collection<String> userGroupKeys, ConversationEntity conversation)
userId
- the id of the user to evaluate its participant typeuserGroupKeys
- the group keys for the user to evaluate its participant typeconversation
- the conversation for which the participant type is evaluatedprotected Optional<String> evaluatePermissionsAndProcessResult(String tenantId, AuthorizedAction action, Conversation scopedObject, Map<String,Object> ruleInput, String decisionModelKey, String globalErrorMessageCode, CommandContext commandContext)
protected Map<String,Object> createRuleInputForDefaultModel(String userId, AuthorizedAction action, Conversation scopedObject, Map<String,Object> detailedRuleInput, CommandContext commandContext)
createRuleInputForDefaultModel
in class AbstractDmnBasedPermissionHelper<Conversation>
protected String getDecisionKeyDefaultPermissions()
getDecisionKeyDefaultPermissions
in class AbstractDmnBasedPermissionHelper<Conversation>