Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Spring Security Annotations

Vladimir Malinin
1 decade ago Dec 20, 2010 10:58am

Hi there.
I was wondering if it's possible to use spring security annotations (like @Secured or @PreAuthorize) to handle user's actions on vaadin components?
I'm trying to ensure that some actions on my vaadin component can do only user with appropriate role.
I annotated method:

	public void clearSearch() ...

which is invoked after user clicks "Clear" button on my custom component.
My current user has role "SUPERADMIN", so when user clicks the button I should get authorization exception, but everything works just like my user has role "ADMIN". So security didn't apply to this method.

Has anyone tried to do such manipulations in their vaadin application.

BTW: security annotations on my spring services work just fine, so it's not a question on basic spring security configuration.

Deleted User
1 decade ago Dec 20, 2010 8:16pm
Vladimir Malinin
1 decade ago Dec 21, 2010 8:22am
Jan polok
1 decade ago Apr 18, 2011 8:34pm
Ivo Jánský
1 decade ago Dec 02, 2011 9:10am
Eugene Knihuta
1 decade ago Feb 09, 2012 10:29am
Angel Infante
1 decade ago Mar 22, 2012 10:34pm
sankar vinnakota
1 decade ago Aug 27, 2012 10:41am
Enkara Dura
8 years ago May 07, 2014 1:33pm
Marko Radinovic
8 years ago Aug 12, 2014 1:42pm