Spring Security Role Generator Plugin
Dependency :
compile ":spring-security-role-generator:0.2"
Summary
Facilitates easier implementation of the spring security core annotated controllers.
Installation
grails install-plugin spring-security-role-generator
Description
Spring Security Role Generator
This plugin facilitates easier implementation of the spring security core plugin's annotated controllers. It does this in two ways:- It provides a controller template that can be used during scaffolding. This controller comes preconfigured with CREATE VIEW EDIT and DELETE annotations for the given class.
- To tie into the controller above a generate-roles script is provided that will generate the statements to create the roles for each class.
generate-roles "*"
generate-roles com.sample.MyClassThe controller template
The plugin provides a custom controller template with the annotations already in place. you can install it by running:install-secure-controller-template
import grails.plugins.springsecurity.Secured@Secured('ROLE_CREATE_${className.toUpperCase()}')
@Secured('ROLE_VIEW_${className.toUpperCase()}')
@Secured('ROLE_EDIT_${className.toUpperCase()}')
@Secured('ROLE_DELETE_${className.toUpperCase()}')