Class AccessControlService
java.lang.Object
fr.paris.lutece.portal.service.accesscontrol.AccessControlService
AccessControlService
-
Constructor Summary
ConstructorsConstructorDescriptionAccessControlService(jakarta.enterprise.inject.Instance<IAccessControlServiceProvider> providerInstance) -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanSessionData(jakarta.servlet.http.HttpServletRequest request, int idResource, String resourceType) Remove the Session Data for the give DatadoExecuteAccessControl(jakarta.servlet.http.HttpServletRequest request, int idResource, String resourceType, Object destination) Redirects to the Access Control exists if the resource has an AccesControl tha has not already been validatedintfindAccessControlForResource(int idResource, String resourceType) Find the access control used by a resource.getAccessControlsEnabled(fr.paris.lutece.api.user.User user, Locale locale) return a reference list which contains a list enabled AccessControlstatic AccessControlServiceDeprecated, for removal: This API element is subject to removal in a future version.booleanCheck if the access control service is available.voidlinkResourceToAccessControl(int idResource, String resourceType, int idAccessControl) Links the given resource to the given access control.
-
Constructor Details
-
AccessControlService
public AccessControlService() -
AccessControlService
@Inject public AccessControlService(@Named("accesscontrol.accessControlServiceProvider") jakarta.enterprise.inject.Instance<IAccessControlServiceProvider> providerInstance)
-
-
Method Details
-
isAvailable
public boolean isAvailable()Check if the access control service is available. To be available, the following conditions must be verified :- the Bean service is not null
- the plugin-accesscontrol must be enable
- Returns:
- true if the workflow service is available
-
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain theAccessControlServiceinstance. This method will be removed in future versions.Returns the unique instance of theAccessControlServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain theAccessControlServiceinstance instead.- Returns:
- The unique instance of
AccessControlService.
-
getAccessControlsEnabled
return a reference list which contains a list enabled AccessControl- Parameters:
user- the Userlocale- the locale- Returns:
- a reference list which contains a list enabled AccessControl
-
findAccessControlForResource
Find the access control used by a resource.- Parameters:
idResource-resourceType-- Returns:
- the id of the access control, -1 if none
-
linkResourceToAccessControl
Links the given resource to the given access control.
if idAccessControl = -1, deletes the link between the resource and any access control.- Parameters:
idResource-resourceType-idAccessControl-
-
doExecuteAccessControl
public XPage doExecuteAccessControl(jakarta.servlet.http.HttpServletRequest request, int idResource, String resourceType, Object destination) Redirects to the Access Control exists if the resource has an AccesControl tha has not already been validated- Parameters:
request-idResource-resourceType-- Returns:
-
cleanSessionData
public void cleanSessionData(jakarta.servlet.http.HttpServletRequest request, int idResource, String resourceType) Remove the Session Data for the give Data- Parameters:
request-idResource-resourceType-
-
@Injectto obtain theAccessControlServiceinstance.