com.vaadin.spring.access
Interface ViewInstanceAccessControl
public interface ViewInstanceAccessControl
Interface to be implemented by Spring beans that will be consulted by the
SpringViewProvider after creating a view
instance but before providing it for navigation. 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.
Unless contextual information from the view instance is needed, a
ViewAccessControl should be used instead of this interface.
ViewAccessControl beans are called before a view instance is created
but can access the annotations on the view bean through the application
context. If any ViewAccessControl denies access to the view, beans
implementing this interface are not called for the view.
- Author:
- Petter Holmström (petter@vaadin.com), Henri Sara (hesara@vaadin.com)
|
Method Summary |
boolean |
isAccessGranted(com.vaadin.ui.UI ui,
String beanName,
com.vaadin.navigator.View view)
Checks if the current user has access to the specified view instance and
UI. |
isAccessGranted
boolean isAccessGranted(com.vaadin.ui.UI ui,
String beanName,
com.vaadin.navigator.View view)
- Checks if the current user has access to the specified view instance and
UI. This method is invoked after
ViewAccessControl.isAccessGranted(com.vaadin.ui.UI, String), when
the view instance has already been created, but before it has been
returned by the view provider.
- Parameters:
ui - the UI, never null.beanName - the bean name of the view, never null.view - the view instance, never null.
- Returns:
- true if access is granted, false if access is denied.
Copyright © 2016 Vaadin Ltd. All Rights Reserved.