Changeset 770 for trunk/grails-app/conf
- Timestamp:
- Aug 3, 2010, 2:00:35 PM (11 years ago)
- Location:
- trunk/grails-app/conf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/NimbleBootStrap.groovy
r247 r770 1 1 /* 2 2 * Nimble, an extensive application base for Grails 3 * Copyright (C) 20 09 Intient Pty Ltd3 * Copyright (C) 2010 Bradley Beddoes 4 4 * 5 5 * Licensed under the Apache License, Version 2.0 (the "License"); … … 17 17 18 18 19 import intient.nimble.InstanceGenerator19 import grails.plugins.nimble.InstanceGenerator 20 20 21 import intient.nimble.domain.LevelPermission22 import intient.nimble.domain.Role23 import intient.nimble.domain.Group24 import intient.nimble.service.AdminsService25 import intient.nimble.service.UserService21 import grails.plugins.nimble.core.LevelPermission 22 import grails.plugins.nimble.core.Role 23 import grails.plugins.nimble.core.Group 24 import grails.plugins.nimble.core.AdminsService 25 import grails.plugins.nimble.core.UserService 26 26 27 27 /* … … 46 46 47 47 // Execute any custom Nimble related BootStrap for your application below 48 if (nimble.User.count() == 0) {49 println ".bootstrapping nimble"50 48 51 52 53 54 55 56 49 // Create example User account 50 def user = InstanceGenerator.user() 51 user.username = "user" 52 user.pass = 'useR123!' 53 user.passConfirm = 'useR123!' 54 user.enabled = true 57 55 58 59 60 61 56 def userProfile = InstanceGenerator.profile() 57 userProfile.fullName = "Test User" 58 userProfile.owner = user 59 user.profile = userProfile 62 60 63 64 65 66 67 68 69 61 def savedUser = userService.createUser(user) 62 if (savedUser.hasErrors()) { 63 savedUser.errors.each { 64 log.error(it) 65 } 66 throw new RuntimeException("Error creating example user") 67 } 70 68 71 72 73 74 75 76 77 69 // Create example Administrative account 70 def admins = Role.findByName(AdminsService.ADMIN_ROLE) 71 def admin = InstanceGenerator.user() 72 admin.username = "admin" 73 admin.pass = "admiN123!" 74 admin.passConfirm = "admiN123!" 75 admin.enabled = true 78 76 79 80 81 82 77 def adminProfile = InstanceGenerator.profile() 78 adminProfile.fullName = "Administrator" 79 adminProfile.owner = admin 80 admin.profile = adminProfile 83 81 84 85 86 87 88 89 90 82 def savedAdmin = userService.createUser(admin) 83 if (savedAdmin.hasErrors()) { 84 savedAdmin.errors.each { 85 log.error(it) 86 } 87 throw new RuntimeException("Error creating administrator") 88 } 91 89 92 adminsService.add(admin) 93 94 } 90 adminsService.add(admin) 95 91 } 96 92 -
trunk/grails-app/conf/NimbleConfig.groovy
r247 r770 1 1 /* 2 2 * Nimble, an extensive application base for Grails 3 * Copyright (C) 20 09 Intient Pty Ltd3 * Copyright (C) 2010 Bradley Beddoes 4 4 * 5 5 * Licensed under the Apache License, Version 2.0 (the "License"); … … 16 16 */ 17 17 18 // change the JavaScript library that grails & nimble use by adjusting this value 19 // valid values: jquery, mootools prototype 20 grails.views.javascript.library='jquery' 21 18 22 nimble { 19 layout {20 application = "main"21 administration = "nimble"22 }23 23 organization { 24 24 name = "" … … 28 28 logosmall = "" 29 29 url = "" 30 } 31 32 layout { 33 application = 'app' 34 administration = 'admin' 35 login = 'app' 36 } 37 38 resources { 39 jslibrary = grails.views.javascript.library 30 40 } 31 41 … … 57 67 58 68 messaging { 69 enabled = false 70 59 71 registration { 60 72 subject = "Your new account is ready!" … … 98 110 noscript = true 99 111 } 112 113 resources { 114 jslibrary = grails.views.javascript.library 115 usejsdev = true 116 usecssdev = true 117 } 100 118 } 101 119 } … … 113 131 noscript = true 114 132 } 133 134 resources { 135 jslibrary = grails.views.javascript.library 136 usejsdev = false 137 usecssdev = false 138 } 115 139 } 116 140 } -
trunk/grails-app/conf/NimbleSecurityFilters.groovy
r247 r770 1 1 /* 2 2 * Nimble, an extensive application base for Grails 3 * Copyright (C) 20 09 Intient Pty Ltd3 * Copyright (C) 2010 Bradley Beddoes 4 4 * 5 5 * Licensed under the Apache License, Version 2.0 (the "License"); … … 15 15 * limitations under the License. 16 16 */ 17 import intient.nimble.service.AdminsService17 import grails.plugins.nimble.core.AdminsService 18 18 19 19 /** … … 22 22 * @author Bradley Beddoes 23 23 */ 24 public class NimbleSecurityFilters extends intient.nimble.security.NimbleFilterBase {24 public class NimbleSecurityFilters extends grails.plugins.nimble.security.NimbleFilterBase { 25 25 26 26 def filters = { … … 31 31 accessControl { 32 32 true 33 }34 }35 }36 37 profilesecure(controller: "profile") {38 before = {39 if(!actionName.equals('miniprofile')) {40 accessControl {41 true42 }43 33 } 44 34 } -
trunk/grails-app/conf/NimbleUrlMappings.groovy
r247 r770 1 1 /* 2 2 * Nimble, an extensive application base for Grails 3 * Copyright (C) 20 09 Intient Pty Ltd3 * Copyright (C) 2010 Bradley Beddoes 4 4 * 5 5 * Licensed under the Apache License, Version 2.0 (the "License"); … … 103 103 controller = "auth" 104 104 } 105 106 "/profile/$action?/$id?" {107 controller = "profile"108 }109 105 } 110 106 }
Note: See TracChangeset
for help on using the changeset viewer.