Permalink
Browse files

cleanup

  • Loading branch information...
1 parent 3914f6c commit 55cd302de5e1790e17d15615ae58b1b1e7d93b83 @burtbeckwith burtbeckwith committed Sep 12, 2011
Showing with 160 additions and 228 deletions.
  1. +14 −23 build.xml
  2. +1 −2 grails-app/controllers/grails/plugins/springsecurity/ui/AclClassController.groovy
  3. +1 −4 grails-app/controllers/grails/plugins/springsecurity/ui/AclEntryController.groovy
  4. +1 −4 grails-app/controllers/grails/plugins/springsecurity/ui/AclObjectIdentityController.groovy
  5. +1 −2 grails-app/controllers/grails/plugins/springsecurity/ui/AclSidController.groovy
  6. +1 −1 grails-app/controllers/grails/plugins/springsecurity/ui/PersistentLoginController.groovy
  7. +1 −3 grails-app/controllers/grails/plugins/springsecurity/ui/RequestmapController.groovy
  8. +0 −37 grails-app/domain/org/codehaus/groovy/grails/plugins/springsecurity/acl/AclClass.groovy
  9. +0 −45 grails-app/domain/org/codehaus/groovy/grails/plugins/springsecurity/acl/AclEntry.groovy
  10. +0 −43 grails-app/domain/org/codehaus/groovy/grails/plugins/springsecurity/acl/AclObjectIdentity.groovy
  11. +0 −38 grails-app/domain/org/codehaus/groovy/grails/plugins/springsecurity/acl/AclSid.groovy
  12. +4 −1 grails-app/views/aclClass/create.gsp
  13. +4 −1 grails-app/views/aclClass/edit.gsp
  14. +4 −1 grails-app/views/aclClass/search.gsp
  15. +4 −1 grails-app/views/aclEntry/create.gsp
  16. +4 −1 grails-app/views/aclEntry/edit.gsp
  17. +4 −1 grails-app/views/aclEntry/search.gsp
  18. +4 −1 grails-app/views/aclObjectIdentity/create.gsp
  19. +4 −1 grails-app/views/aclObjectIdentity/edit.gsp
  20. +4 −1 grails-app/views/aclObjectIdentity/search.gsp
  21. +4 −1 grails-app/views/aclSid/create.gsp
  22. +4 −1 grails-app/views/aclSid/edit.gsp
  23. +4 −1 grails-app/views/aclSid/search.gsp
  24. +3 −0 grails-app/views/login/auth.gsp
  25. +4 −1 grails-app/views/persistentLogin/edit.gsp
  26. +3 −0 grails-app/views/persistentLogin/search.gsp
  27. +3 −0 grails-app/views/register/forgotPassword.gsp
  28. +3 −0 grails-app/views/register/index.gsp
  29. +3 −1 grails-app/views/register/resetPassword.gsp
  30. +4 −1 grails-app/views/registrationCode/edit.gsp
  31. +5 −2 grails-app/views/registrationCode/search.gsp
  32. +4 −1 grails-app/views/requestmap/create.gsp
  33. +4 −1 grails-app/views/requestmap/edit.gsp
  34. +4 −1 grails-app/views/requestmap/search.gsp
  35. +4 −1 grails-app/views/role/create.gsp
  36. +3 −0 grails-app/views/role/edit.gsp
  37. +4 −1 grails-app/views/role/search.gsp
  38. +5 −3 grails-app/views/securityInfo/config.gsp
  39. +4 −0 grails-app/views/securityInfo/currentAuth.gsp
  40. +4 −0 grails-app/views/securityInfo/filterChain.gsp
  41. +4 −0 grails-app/views/securityInfo/logoutHandlers.gsp
  42. +4 −0 grails-app/views/securityInfo/mappings.gsp
  43. +4 −0 grails-app/views/securityInfo/providers.gsp
  44. +3 −0 grails-app/views/securityInfo/usercache.gsp
  45. +4 −0 grails-app/views/securityInfo/voters.gsp
  46. +3 −0 grails-app/views/user/create.gsp
  47. +2 −0 grails-app/views/user/edit.gsp
  48. +4 −1 grails-app/views/user/search.gsp
View
@@ -26,25 +26,14 @@
<macrodef name='grails'>
<attribute name='action' />
<attribute name='environment' default='dev' />
- <element name='args' optional='true' />
+ <element name='preArgs' optional='true' />
+ <element name='postArgs' optional='true' />
<sequential>
<exec executable='${grails}' failonerror='true'>
- <args />
- <arg value='@{environment}'/>
- <arg value='@{action}'/>
- </exec>
- </sequential>
- </macrodef>
-
- <macrodef name='grails-debug'>
- <attribute name='action' />
- <attribute name='environment' default='dev' />
- <element name='args' optional='true' />
- <sequential>
- <exec executable='${grails-debug}' failonerror='true'>
- <args />
+ <preArgs />
<arg value='@{environment}'/>
<arg value='@{action}'/>
+ <postArgs />
</exec>
</sequential>
</macrodef>
@@ -60,25 +49,27 @@
<delete><fileset dir='.' includes='*.log*' /></delete>
</target>
- <target name='doc' description='Generates docs' depends='init'>
- <grails action='doc' />
- </target>
-
<target name='test' description='Run unit tests' depends='clean'>
- <grails action='test-app' environment='test' />
+ <grails action='test-app' environment='test'>
+ <postArgs><arg value='-unit' /></postArgs>
+ </grails>
</target>
- <target name='package' description='Package the plugin' depends='test'>
+ <target name='package' description='Package the plugin'
+ depends='test, doPackage, post-package-cleanup'/>
+ <target name='doPackage'>
<grails action='package-plugin' />
+ </target>
- <!-- clean up -->
+ <target name='post-package-cleanup'>
<delete dir='grails-app/conf/hibernate'/>
<delete dir='grails-app/conf/spring'/>
<delete dir='grails-app/utils'/>
<delete dir='src/groovy'/>
<delete dir='src/java'/>
- <delete dir='test'/>
+ <delete dir='test/functional'/>
+ <delete dir='test/integration'/>
<delete dir='web-app/META-INF'/>
<delete dir='web-app/WEB-INF'/>
</target>
@@ -15,7 +15,6 @@
package grails.plugins.springsecurity.ui
import grails.converters.JSON
-import grails.plugins.springsecurity.ui.AbstractS2UiController
import org.springframework.dao.DataIntegrityViolationException
@@ -85,7 +84,7 @@ class AclClassController extends AbstractS2UiController {
setIfMissing 'max', 10, 100
setIfMissing 'offset', 0
- def hql = new StringBuilder('FROM ' + lookupClassName() + ' c WHERE 1=1 ')
+ def hql = new StringBuilder('FROM ').append(lookupClassName()).append(' c WHERE 1=1 ')
def queryParams = [:]
for (name in ['className']) {
@@ -14,9 +14,6 @@
*/
package grails.plugins.springsecurity.ui
-import grails.converters.JSON
-import grails.plugins.springsecurity.ui.AbstractS2UiController
-
import org.springframework.dao.DataIntegrityViolationException
/**
@@ -95,7 +92,7 @@ class AclEntryController extends AbstractS2UiController {
setIfMissing 'max', 10, 100
setIfMissing 'offset', 0
- def hql = new StringBuilder('FROM ' + lookupClassName() + ' e WHERE 1=1 ')
+ def hql = new StringBuilder('FROM ').append(lookupClassName()).append(' e WHERE 1=1 ')
def queryParams = [:]
for (name in ['aceOrder', 'mask']) {
@@ -14,9 +14,6 @@
*/
package grails.plugins.springsecurity.ui
-import grails.converters.JSON
-import grails.plugins.springsecurity.ui.AbstractS2UiController
-
import org.springframework.dao.DataIntegrityViolationException
/**
@@ -100,7 +97,7 @@ class AclObjectIdentityController extends AbstractS2UiController {
setIfMissing 'max', 10, 100
setIfMissing 'offset', 0
- def hql = new StringBuilder('FROM ' + lookupClassName() + ' oid WHERE 1=1 ')
+ def hql = new StringBuilder('FROM ').append(lookupClassName()).append(' oid WHERE 1=1 ')
def queryParams = [:]
if (params.objectId) {
@@ -15,7 +15,6 @@
package grails.plugins.springsecurity.ui
import grails.converters.JSON
-import grails.plugins.springsecurity.ui.AbstractS2UiController
import org.springframework.dao.DataIntegrityViolationException
@@ -87,7 +86,7 @@ class AclSidController extends AbstractS2UiController {
setIfMissing 'max', 10, 100
setIfMissing 'offset', 0
- def hql = new StringBuilder('FROM ' + lookupClassName() + ' s WHERE 1=1 ')
+ def hql = new StringBuilder('FROM ').append(lookupClassName()).append(' s WHERE 1=1 ')
def queryParams = [:]
for (name in ['sid']) {
@@ -70,7 +70,7 @@ class PersistentLoginController extends AbstractS2UiController {
setIfMissing 'max', 10, 100
setIfMissing 'offset', 0
- def hql = new StringBuilder('FROM ' + lookupPersistentLoginClassName() + ' pl WHERE 1=1 ')
+ def hql = new StringBuilder('FROM ').append(lookupPersistentLoginClassName()).append(' pl WHERE 1=1 ')
def queryParams = [:]
for (name in ['username', 'series', 'token']) {
@@ -14,8 +14,6 @@
*/
package grails.plugins.springsecurity.ui
-import grails.plugins.springsecurity.ui.AbstractS2UiController
-
import org.springframework.dao.DataIntegrityViolationException
/**
@@ -31,7 +29,7 @@ class RequestmapController extends AbstractS2UiController {
setIfMissing 'max', 10, 100
setIfMissing 'offset', 0
- def hql = new StringBuilder('FROM ' + lookupRequestmapClassName() + ' r WHERE 1=1 ')
+ def hql = new StringBuilder('FROM ').append(lookupRequestmapClassName()).append(' r WHERE 1=1 ')
def queryParams = [:]
for (name in ['url', 'configAttribute']) {
@@ -1,37 +0,0 @@
-/* Copyright 2009-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.codehaus.groovy.grails.plugins.springsecurity.acl
-
-/**
- * @author <a href='mailto:burt@burtbeckwith.com'>Burt Beckwith</a>
- */
-class AclClass {
-
- String className
-
- @Override
- String toString() {
- "AclClass id $id, className $className"
- }
-
- static mapping = {
- className column: 'class'
- version false
- }
-
- static constraints = {
- className unique: true, blank: false, size: 1..255
- }
-}
@@ -1,45 +0,0 @@
-/* Copyright 2009-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.codehaus.groovy.grails.plugins.springsecurity.acl
-
-/**
- * @author <a href='mailto:burt@burtbeckwith.com'>Burt Beckwith</a>
- */
-class AclEntry {
-
- AclObjectIdentity aclObjectIdentity
- int aceOrder
- AclSid sid
- int mask
- boolean granting
- boolean auditSuccess
- boolean auditFailure
-
- @Override
- String toString() {
- "AclEntry id $id, aceOrder $aceOrder, mask $mask, granting $granting, " +
- "aclObjectIdentity $aclObjectIdentity"
- }
-
- static mapping = {
- version false
- sid column: 'sid'
- aclObjectIdentity column: 'acl_object_identity'
- }
-
- static constraints = {
- aceOrder unique: 'aclObjectIdentity'
- }
-}
@@ -1,43 +0,0 @@
-/* Copyright 2009-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.codehaus.groovy.grails.plugins.springsecurity.acl
-
-import grails.plugins.springsecurity.acl.AbstractAclObjectIdentity
-
-/**
- * @author <a href='mailto:burt@burtbeckwith.com'>Burt Beckwith</a>
- */
-class AclObjectIdentity extends AbstractAclObjectIdentity {
-
- Long objectId
-
- @Override
- String toString() {
- "AclObjectIdentity id $id, aclClass $aclClass.className, " +
- "objectId $objectId, entriesInheriting $entriesInheriting"
- }
-
- static mapping = {
- version false
- aclClass column: 'object_id_class'
- owner column: 'owner_sid'
- parent column: 'parent_object'
- objectId column: 'object_id_identity'
- }
-
- static constraints = {
- objectId unique: 'aclClass'
- }
-}
@@ -1,38 +0,0 @@
-/* Copyright 2009-2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.codehaus.groovy.grails.plugins.springsecurity.acl
-
-/**
- * @author <a href='mailto:burt@burtbeckwith.com'>Burt Beckwith</a>
- */
-class AclSid {
-
- String sid
- boolean principal
-
- @Override
- String toString() {
- "AclSid id $id, sid $sid, principal $principal"
- }
-
- static mapping = {
- version false
- }
-
- static constraints = {
- principal unique: 'sid'
- sid blank: false, size: 1..255
- }
-}
@@ -1,3 +1,5 @@
+<html>
+
<head>
<meta name='layout' content='springSecurityUI'/>
<g:set var="entityName" value="${message(code: 'aclClass.label', default: 'AclClass')}"/>
@@ -9,7 +11,7 @@
<div class="body">
<s2ui:form width='100%' height='200' elementId='formContainer'
- titleCode='default.create.label' titleCodeArgs='[entityName]'>
+ titleCode='default.create.label' titleCodeArgs='[entityName]'>
<g:form action="save" name='aclClassCreateForm'>
<div class="dialog">
@@ -52,3 +54,4 @@ $(document).ready(function() {
</script>
</body>
+</html>
@@ -1,3 +1,5 @@
+<html>
+
<head>
<meta name='layout' content='springSecurityUI'/>
<g:set var="entityName" value="${message(code: 'aclClass.label', default: 'AclClass')}" />
@@ -9,7 +11,7 @@
<div class="body">
<s2ui:form width='100%' height='225' elementId='formContainer'
- titleCode='default.edit.label' titleCodeArgs='[entityName]'>
+ titleCode='default.edit.label' titleCodeArgs='[entityName]'>
<g:form action='update' name='aclClassEditForm'>
<g:hiddenField name="id" value="${aclClass?.id}"/>
@@ -58,3 +60,4 @@
</div>
</body>
+</html>
@@ -1,3 +1,5 @@
+<html>
+
<head>
<meta name='layout' content='springSecurityUI'/>
<title><g:message code='spring.security.ui.aclClass.search'/></title>
@@ -8,7 +10,7 @@
<div>
<s2ui:form width='100%' height='175' elementId='formContainer'
- titleCode='spring.security.ui.aclClass.search'>
+ titleCode='spring.security.ui.aclClass.search'>
<g:form action='aclClassSearch' name='aclClassSearchForm'>
@@ -78,3 +80,4 @@ $(document).ready(function() {
</script>
</body>
+</html>
Oops, something went wrong.

0 comments on commit 55cd302

Please sign in to comment.