Class SecurityActionFormInterceptor
java.lang.Object
ch.tocco.nice2.model.form.impl.form2.interceptors.SecurityActionFormInterceptor
- All Implemented Interfaces:
FormInterceptor
@Component
@Order(1100)
public class SecurityActionFormInterceptor
extends Object
implements FormInterceptor
This form interceptor removes the actions from the forms which the current user is not
allowed to execute.
If you write your own FormInterceptor that adds actions to a form, you *must* make sure that
you check the needed permissions in the form interceptor yourself and add the actions only,
if the current user is allowed to execute them.
To prevent this interceptor from removing actions that are added in other form interceptors,
this interceptor should run before all the other interceptors.
-
Field Summary
FieldsFields inherited from interface FormInterceptor
SORTING_ORDER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidmodifyForm(FormBuilder formBuilder, String baseName, FormScope formScope) voidsetContributions(List<ActionForEntityPermissionContribution> contributions) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FormInterceptor
getActionGroupBuilder, getActionGroupBuilder, getActionsActionGroupBuilder, getCreateCopyActionGroupBuilder, getOutputActionGroupBuilder
-
Field Details
-
ORDER
public static final int ORDER- See Also:
-
-
Constructor Details
-
SecurityActionFormInterceptor
-
-
Method Details
-
modifyForm
- Specified by:
modifyFormin interfaceFormInterceptor
-
setContributions
@Autowired(required=false) public void setContributions(List<ActionForEntityPermissionContribution> contributions)
-