Class FilterHelper
java.lang.Object
com.tremolosecurity.scalejs.helpers.FilterHelper
- All Implemented Interfaces:
UiDecisions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailableAttributes(AuthInfo user, jakarta.servlet.http.HttpServletRequest request) Return a subset of attributes that a user is able to edit.booleancanEditUser(AuthInfo user, jakarta.servlet.http.HttpServletRequest request) Returns true if the currently logged in user can be editedbooleancanPreApprove(String workflowName, AuthInfo user, jakarta.servlet.http.HttpServletRequest request) Return true if the current user is able to make attempt pre-approvalsbooleancanRequestForOthers(String workflowName, AuthInfo user, jakarta.servlet.http.HttpServletRequest request) Return true if the current user is able to make requests for other usersvoidInitializes the decision class
-
Constructor Details
-
FilterHelper
public FilterHelper()
-
-
Method Details
-
init
Description copied from interface:UiDecisionsInitializes the decision class- Specified by:
initin interfaceUiDecisions- Parameters:
config-
-
canEditUser
Description copied from interface:UiDecisionsReturns true if the currently logged in user can be edited- Specified by:
canEditUserin interfaceUiDecisions- Returns:
-
availableAttributes
public Set<String> availableAttributes(AuthInfo user, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:UiDecisionsReturn a subset of attributes that a user is able to edit. Return null if all attributes are available- Specified by:
availableAttributesin interfaceUiDecisions- Parameters:
user-request-- Returns:
-
canRequestForOthers
public boolean canRequestForOthers(String workflowName, AuthInfo user, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:UiDecisionsReturn true if the current user is able to make requests for other users- Specified by:
canRequestForOthersin interfaceUiDecisions- Parameters:
workflowName- Name of the workflow to be testeduser- Currently logged in userrequest- Current request- Returns:
-
canPreApprove
public boolean canPreApprove(String workflowName, AuthInfo user, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:UiDecisionsReturn true if the current user is able to make attempt pre-approvals- Specified by:
canPreApprovein interfaceUiDecisions- Parameters:
workflowName- Name of the workflow to be testeduser- Currently logged in userrequest- Current request- Returns:
-