Hi! In my app I have a view with a form inside. Th...
# questions
u
Hi! In my app I have a view with a form inside. The form is configured with this parameters
Copy code
<form id="form-request-registration" controller="registrazione" role="form" action="GeneraRichiestaPdf" method="post" autocomplete="off">
When submit button is pressed, client makes POST request to /GeneraRichiestaPdf but I receive a 403 ‘not authorized’. The application is a porting from Grails 4 to Grails 7.0.0-M3..
t
Is your application using the Spring Security plugin (
org.grails.plugins:spring-security-core
)? If so, does your
GeneraRichiestaPdf
method in the
RegistrazioneController
require users to have a certain role in order to call it i.e. is it annotated with
@Secured(['ROLE_ADMIN'])
? Or should anyone be able to call the method, even if they are not logged in, because it is annotated with
@Secured(['permitAll'])
? If you're using Spring Security, another place to check would be the
grails.plugin.springsecurity.controllerAnnotations.staticRules
configuration in either your
grails-app/conf/application.yml
file or
grails-app/conf/application.groovy
file.