Conditional Statements in Spring @preauthorize EL -
hi here problem add conditional statements in @preauthorize spring annotation ,i need give users_view , users_manage permission principal cant add both permission below @preauthorize("haspermission(#id, 'com.foo', 'users_view','users_manage')")
in @preauthorize ,i have idea below
@preauthorize("haspermission(#id, 'com.foo', 'users_view') or haspermission(#id, 'com.foo', 'users_view')")
will spring support conditional clauses in @preauthorize if not solution this.(here need use @preauthorize rather hasroles[])
thanks in advance
of course will. have not tried in uppercase, in lowercase sure (i mean or
instead of or
). see logical operators section of official documentation.
Comments
Post a Comment