com.vaadin.spring.access
Interface ViewAccessControl


public interface ViewAccessControl

Interface to be implemented by Spring beans that will be consulted before the SpringViewProvider creates a view instance. If any of the view access controls deny access, the view provider will act like no such view ever existed, or show an access denied view. Access control beans implementing this interface are called before a view instance is created but can access the annotations on the view bean class through the application context. Unless contextual information from the view instance is needed, this interface should be used instead of a ViewInstanceAccessControl.

Author:
Petter Holmström (petter@vaadin.com), Henri Sara (hesara@vaadin.com)

Method Summary
 boolean isAccessGranted(com.vaadin.ui.UI ui, String beanName)
          Checks if the current user has access to the specified view and UI.
 

Method Detail

isAccessGranted

boolean isAccessGranted(com.vaadin.ui.UI ui,
                        String beanName)
Checks if the current user has access to the specified view and UI.

Parameters:
ui - the UI, never null.
beanName - the bean name of the view, never null.
Returns:
true if access is granted, false if access is denied.


Copyright © 2016 Vaadin Ltd. All Rights Reserved.