Interface IAuthorizationStrategy

    • Method Detail

      • isActionAuthorized

        boolean isActionAuthorized​(Component component,
                                   Action action)
        Gets whether the given action is permitted. If it is, this method should return true. If it isn't, this method should either return false or - in case of a serious breach - throw a security exception. Returning is generally preferable over throwing an exception as that doesn't break the normal flow.
        component - The component to be acted upon
        action - The action to authorize on the component
        Whether the given action may be taken on the given component
        AuthorizationException - Can be thrown by implementation if action is unauthorized
        See Also:
        Component.ENABLE, Component.RENDER
      • isResourceAuthorized

        boolean isResourceAuthorized​(IResource resource,
                                     PageParameters parameters)
        Checks whether a request with some parameters is allowed to a resource.
        resource - The resource that should be processed
        parameters - The request parameters
        true if the request to this resource is allowed.