Last change
on this file since 72 was
71,
checked in by gav, 16 years ago
|
Start changing roles to AppAdmin? and AppUser?.
Add Options view, start code for user changeable passwords.
Repair home and admin bean error variables.
|
File size:
628 bytes
|
Line | |
---|
1 | import org.codehaus.groovy.grails.plugins.springsecurity.Secured |
---|
2 | |
---|
3 | class AppCoreController extends BaseController { |
---|
4 | |
---|
5 | def authenticateService |
---|
6 | |
---|
7 | def index = { redirect(action:home,params:params) } |
---|
8 | |
---|
9 | // the delete, save and update actions only accept POST requests |
---|
10 | //def allowedMethods = [delete:'POST', save:'POST', update:'POST'] |
---|
11 | |
---|
12 | |
---|
13 | def home = { |
---|
14 | } |
---|
15 | |
---|
16 | def options = { |
---|
17 | def principal = authenticateService.principal() |
---|
18 | println principal.getUsername()//get username |
---|
19 | println principal.getAuthorities()//get authorities() |
---|
20 | } |
---|
21 | |
---|
22 | @Secured(['ROLE_AppAdmin']) |
---|
23 | def admin = { |
---|
24 | } |
---|
25 | |
---|
26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.