- Timestamp:
- Mar 10, 2009, 3:00:59 AM (16 years ago)
- Location:
- branches/TaskRewrite/src/grails-app
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/TaskRewrite/src/grails-app/conf/BootStrap.groovy
r69 r71 63 63 def authInstance 64 64 65 authInstance = new Authority(description:"Application Admin ",66 authority:"ROLE_A DMIN")65 authInstance = new Authority(description:"Application Admin, grants full admin access to the application.", 66 authority:"ROLE_AppAdmin") 67 67 BootStrapSaveAndTest(authInstance) 68 68 69 authInstance = new Authority(description:"Application Admin",70 authority:"ROLE_ USER")69 authInstance = new Authority(description:"Application User, all application users need this base role.", 70 authority:"ROLE_AppUser") 71 71 BootStrapSaveAndTest(authInstance) 72 72 -
branches/TaskRewrite/src/grails-app/conf/SecurityConfig.groovy
r69 r71 20 20 21 21 //Set true especially if used across the internet. 22 forceHttps = ' true'22 forceHttps = 'false' 23 23 24 24 //Pessimistic locking, deny access to all URLs that don't -
branches/TaskRewrite/src/grails-app/controllers/AppCoreController.groovy
r69 r71 2 2 3 3 class AppCoreController extends BaseController { 4 5 def authenticateService 4 6 5 7 def index = { redirect(action:home,params:params) } … … 12 14 } 13 15 14 @Secured(['ROLE_ADMIN']) 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']) 15 23 def admin = { 16 24 } -
branches/TaskRewrite/src/grails-app/controllers/AuthorityController.groovy
r62 r71 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 @Secured(['ROLE_A DMIN'])3 @Secured(['ROLE_AppAdmin']) 4 4 class AuthorityController { 5 5 -
branches/TaskRewrite/src/grails-app/controllers/BaseController.groovy
r69 r71 1 1 import org.codehaus.groovy.grails.plugins.springsecurity.Secured 2 2 3 @Secured(['ROLE_ USER'])3 @Secured(['ROLE_AppUser']) 4 4 abstract class BaseController { 5 5 def whatsit() { -
branches/TaskRewrite/src/grails-app/views/_adminmenubar.gsp
r59 r71 1 1 <g:isLoggedIn> 2 <g:ifAnyGranted role="ROLE_A DMIN">2 <g:ifAnyGranted role="ROLE_AppAdmin"> 3 3 <span class="appControlButton"> 4 4 <g:link controller="appCore" action="admin"> … … 8 8 </g:ifAnyGranted> 9 9 <span class="appControlButton"> 10 <g:link controller="appCore" action="options"> 11 Options 12 </g:link> 13 </span> 14 <span class="appControlButton"> 10 15 <g:link controller="logout"> 11 16 Log out -
branches/TaskRewrite/src/grails-app/views/appCore/admin.gsp
r59 r71 16 16 <ul> 17 17 <g:each var="c" in="${grailsApplication.controllerClasses}"> 18 <li class="controller"><g:link 19 controller="${c.logicalPropertyName}">${c.fullName}</g:link></li> 18 <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName}</g:link></li> 20 19 </g:each> 21 20 </ul> -
branches/TaskRewrite/src/grails-app/views/appCore/home.gsp
r59 r71 15 15 <div class="message">${flash.message}</div> 16 16 </g:if> 17 <g:hasErrors bean="${ person}">17 <g:hasErrors bean="${appCoreInstance}"> 18 18 <div class="errors"> 19 <g:renderErrors bean="${ person}" as="list" />19 <g:renderErrors bean="${appCoreInstance}" as="list" /> 20 20 </div> 21 21 </g:hasErrors>
Note: See TracChangeset
for help on using the changeset viewer.