Package io.jmix.dynmodel.security
Class DynamicModelSecuritySupport
java.lang.Object
io.jmix.dynmodel.security.DynamicModelSecuritySupport
@Component("dynmod_DynamicModelSecuritySupport")
public class DynamicModelSecuritySupport
extends Object
Provides methods to check access to dynamic model configuration.
There are two permissions: DynmodApplyAccessContext allows applying any change, and
DynmodSafeApplyAccessContext allows applying only the changes that cannot lose data. Which changes
can lose data is decided by DynamicModelManager.getDataLosingMigrations().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleanboolean
-
Constructor Details
-
DynamicModelSecuritySupport
public DynamicModelSecuritySupport()
-
-
Method Details
-
isApplyPermitted
public boolean isApplyPermitted()- Returns:
- true if the current user may apply any dynamic model change, including changes that lose data
-
checkApplyPermitted
public void checkApplyPermitted()- Throws:
AccessDeniedException- if the current user may not apply every kind of dynamic model change
-
isModifyPermitted
public boolean isModifyPermitted()- Returns:
- true if the current user may edit the dynamic model and apply at least the changes that cannot lose data
-
checkModifyPermitted
public void checkModifyPermitted()- Throws:
AccessDeniedException- if the current user may not edit the dynamic model
-