Last updated by burtbeckwith 5 years ago
Version 0.5.1 of the plugin is mostly backwards-compatible with version 0.4.1, so if you're using version 0.4.1 of the plugin and want to upgrade to version 0.5 there's not much to do to upgrade:
  • delete the current plugin zip and expanded folder from the plugins folder
  • install the new plugin:
grails install-plugin acegi

If you're using Eclipse, remove the old plugin's source folders and jar files from your classpath and add these:

  • add these plugin folders as Source Folders:
    • plugins/acegi-0.5/grails-app/controllers
    • plugins/acegi-0.5/grails-app/services
    • plugins/acegi-0.5/grails-app/taglib
    • plugins/acegi-0.5/src/groovy
    • plugins/acegi-0.5/src/java
  • and these jars:
    • plugins/acegi-0.5/lib/commons-codec-1.3.jar
    • plugins/acegi-0.5/lib/spring-security-core-2.0.4.jar
    • plugins/acegi-0.5/lib/spring-security-core-tiger-2.0.4.jar
If you're using another IDE, perform the corresponding steps.

If you're using Grails 1.1, you should edit RequestmapController, RoleController, and UserController and change 'def allowedMethods' to 'static allowedMethods'. This isn't required but is a good idea, and Grails will complain at app start if you don't.

Backwards compatibility issues

There are some changes in the Requestmap handling that affect backwards compatibility. The first is that previously, since only roles were valid for Requestmaps, you'd create an 'admin' role and it would create ROLE_ADMIN for you. Since you can now add in IS_AUTHENTICATED_FULLY or other tokens in addition to roles for the 'configAttribute' value, you must create roles with their full names. This only affects new Requestmap creation - the values in the database haven't changed.

Also, requestmaps are now cached for performance. Any time a Requestmap is created, edited, or deleted, the cache must be flushed and rebuilt. RequestmapController has these calls in the appropriate methods, but custom code will need to use the same conventions. Call "authenticateService.clearCachedRequestmaps()" to flush the cache, and the next request will trigger repopulation of the cache.