Class PermissionContext
java.lang.Object
com.onenetwork.platform.data.model.PermissionContext
public class PermissionContext
extends java.lang.Object
Helper class for custom model permission policy to set the permission context.
Used primarily from
BaseCustomModelPermissionPolicy
.-
Constructor Summary
Constructors Constructor Description PermissionContext(PlatformUserContext platformUserContext)
-
Method Summary
Modifier and Type Method Description PlatformUserContext
getPlatformUserContext()
boolean
isIgnoreOtherPermissionTypes()
By default, platform apply all the permission types available on the model and all different permission types should be satisfied for model read and write to work.void
setIgnoreOtherPermissionTypes(boolean ignoreOtherPermissionTypes)
-
Constructor Details
-
Method Details
-
isIgnoreOtherPermissionTypes
public boolean isIgnoreOtherPermissionTypes()By default, platform apply all the permission types available on the model and all different permission types should be satisfied for model read and write to work. You can set the ignoreOtherPermissionTypes flag to true to only apply the custom permission policy and ignore other permission types. -
setIgnoreOtherPermissionTypes
public void setIgnoreOtherPermissionTypes(boolean ignoreOtherPermissionTypes)- Parameters:
ignoreOtherPermissionTypes
- whether to ignore other permission types
-
getPlatformUserContext
- Returns:
- context of the user trying to fetch model data
-