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