I have a domain class called Profile. I tried to access its properties in the following code:
Profile p = new Profile()
// doing some changes
p.name = 'Larry'
//....
p.save(flush:true)
// then I print out the properties, and this line of code raises warning.
print p.properties
Then the following warning message shows up:
WARN security.Security - An attempt was made to use the grailsSecurity bean, but there is no security bridge implementation defined. You must install a security plugin and/or provide a grailsSecurityBridge bean.
I do have a spring-security plugin. So I'm not so sure about the meaning of this security issue. A different security plugin?
I cannot find any information related to this issue. Could someone help me please? Thank you!
I did a search on "grailsSecurityBridge bean". The results led me to the Grails plugin platform-core:1.0.RC5, which was installed in my application.
So I created another project and tried to access the profile properties with and without the plugin. And the result showed that the plugin was the cause.
I'm not sure if I need this plugin in my application but at least I know the cause now.
Update: I'm using another plugin "email confirmation" which depends on the platform-core plugin. So uninstall the platform-plugin is not the solution.
Instead, we should implement the graisSecurityBridge bean. Just follow the following links: http://grailsrocks.github.io/grails-platform-core/guide/security.html#security_implementing_bridge http://grailsrocks.com/blog/2012/03/28/hooking-up-platform-core-security-api-to-your-security-provider