Closed mburak closed 7 years ago
I'm also getting this error:
Failed to initialize class [test.TestRole] from plugin
I'm assuming this is referring to className being set to test.testRole in the plugins application.yml file:
grails:
plugin:
springsecurity:
authority:
className: 'test.testRole'
I attempted to overwrite this value in the project's application.yml file but it doesn't appear to accept that value, falling back to the plugin defaults.
The plugin has Spring Security Test Classes to perform testing on the plugin. As this plugin is dependent on the Spring Security Core Plugin, The plugin assumes that the Spring Security will be set up as well.
Either you don't have the spring security quickstart classes.... or they are not in your application.yml/application.groovy
To resolve this. Run the Spring Security Plugin s2-quickstart Read More
You have an opportunity to specify the package and classname. The quickstart will create the 3 domain classes and populate application.groovy with the following entries:
grails.plugin.springsecurity.userLookup.userDomainClassName = 'your.package.User' grails.plugin.springsecurity.userLookup.authorityJoinClassName = 'your.package.UserRole' grails.plugin.springsecurity.authority.className = 'your.package.Role' grails.plugin.springsecurity.authority.nameField = 'authority'
You can then convert that to application.yml as well.
I will add this to the documentation as well.
I created this plugin against an application that already had all of the required spring security dependencies and settings in place. I have updated the documentation to outline those other configuration items (build.gradle and applicatIon.(groovy/yml) and have also added examples of all 3 of those files which will fully load successfully and then allow you to change the configuration to match your sp/idp setup.
Thanks so much. I'll give it a try soon.
Version 3.1.0 of the plugin has been released. It resolves the GORM incompatibility issues as well. If your grails app uses version 3.0.x then use version 3.0.0 of the plugin. If your grails app is 3.1+ then use the 3.1.0 version of the plugin.
I'm getting this when I add the v3 of the plugin:
It looks like trying to load a different version of gorm? Any ideas?