Permalink
Browse files

replaced shiro by platform-core plugin

  • Loading branch information...
1 parent 6f8b935 commit 30a685d2c3ac238299096f5e0a869cda51ede9dc @fterrier committed Oct 9, 2012
Showing with 5,102 additions and 107 deletions.
  1. +17 −19 .classpath
  2. +3 −0 .gitignore
  3. +37 −32 .project
  4. +1 −1 RabbitmqTasksGrailsPlugin.groovy
  5. +1 −2 application.properties
  6. +2 −4 grails-app/conf/BuildConfig.groovy
  7. +1 −2 grails-app/controllers/org/chai/task/TaskController.groovy
  8. +0 −30 test/integration/org/chai/task/IntegrationTests.groovy
  9. +19 −13 test/integration/org/chai/task/TaskControllerSpec.groovy
  10. +2 −1 test/integration/org/chai/task/TaskJobSpec.groovy
  11. +2 −3 test/integration/org/chai/task/TaskServiceSpec.groovy
  12. +275 −0 test/projects/test-task-project/.classpath
  13. +222 −0 test/projects/test-task-project/.project
  14. +6 −0 test/projects/test-task-project/application.properties
  15. +5 −0 test/projects/test-task-project/grails-app/conf/ApplicationResources.groovy
  16. +7 −0 test/projects/test-task-project/grails-app/conf/BootStrap.groovy
  17. +50 −0 test/projects/test-task-project/grails-app/conf/BuildConfig.groovy
  18. +104 −0 test/projects/test-task-project/grails-app/conf/Config.groovy
  19. +43 −0 test/projects/test-task-project/grails-app/conf/DataSource.groovy
  20. +17 −0 test/projects/test-task-project/grails-app/conf/ShiroSecurityFilters.groovy
  21. +13 −0 test/projects/test-task-project/grails-app/conf/UrlMappings.groovy
  22. +7 −0 test/projects/test-task-project/grails-app/conf/spring/resources.groovy
  23. +85 −0 test/projects/test-task-project/grails-app/controllers/org/chai/task/AuthController.groovy
  24. +11 −0 test/projects/test-task-project/grails-app/domain/org/chai/task/ShiroRole.groovy
  25. +11 −0 test/projects/test-task-project/grails-app/domain/org/chai/task/ShiroUser.groovy
  26. +55 −0 test/projects/test-task-project/grails-app/i18n/messages.properties
  27. +55 −0 test/projects/test-task-project/grails-app/i18n/messages_cs_CZ.properties
  28. +56 −0 test/projects/test-task-project/grails-app/i18n/messages_da.properties
  29. +55 −0 test/projects/test-task-project/grails-app/i18n/messages_de.properties
  30. +55 −0 test/projects/test-task-project/grails-app/i18n/messages_es.properties
  31. +19 −0 test/projects/test-task-project/grails-app/i18n/messages_fr.properties
  32. +55 −0 test/projects/test-task-project/grails-app/i18n/messages_it.properties
  33. +55 −0 test/projects/test-task-project/grails-app/i18n/messages_ja.properties
  34. +55 −0 test/projects/test-task-project/grails-app/i18n/messages_nl.properties
  35. +59 −0 test/projects/test-task-project/grails-app/i18n/messages_pl.properties
  36. +59 −0 test/projects/test-task-project/grails-app/i18n/messages_pt_BR.properties
  37. +34 −0 test/projects/test-task-project/grails-app/i18n/messages_pt_PT.properties
  38. +31 −0 test/projects/test-task-project/grails-app/i18n/messages_ru.properties
  39. +55 −0 test/projects/test-task-project/grails-app/i18n/messages_sv.properties
  40. +55 −0 test/projects/test-task-project/grails-app/i18n/messages_th.properties
  41. +18 −0 test/projects/test-task-project/grails-app/i18n/messages_zh_CN.properties
  42. +1 −0 test/projects/test-task-project/grails-app/i18n/shiro.properties
  43. +130 −0 test/projects/test-task-project/grails-app/realms/ShiroDbRealm.groovy
  44. +71 −0 test/projects/test-task-project/grails-app/services/org/chai/task/ShiroSecurityBridge.groovy
  45. +35 −0 test/projects/test-task-project/grails-app/views/auth/login.gsp
  46. +11 −0 test/projects/test-task-project/grails-app/views/error.gsp
  47. +122 −0 test/projects/test-task-project/grails-app/views/index.gsp
  48. +28 −0 test/projects/test-task-project/grails-app/views/layouts/main.gsp
  49. +8 −0 test/projects/test-task-project/scripts/create_cpvardirs_unix.sh
  50. +37 −0 test/projects/test-task-project/test/integration/org/chai/task/TaskControllerSpec.groovy
  51. +33 −0 test/projects/test-task-project/web-app/WEB-INF/applicationContext.xml
  52. +14 −0 test/projects/test-task-project/web-app/WEB-INF/sitemesh.xml
  53. +572 −0 test/projects/test-task-project/web-app/WEB-INF/tld/c.tld
  54. +671 −0 test/projects/test-task-project/web-app/WEB-INF/tld/fmt.tld
  55. +550 −0 test/projects/test-task-project/web-app/WEB-INF/tld/grails.tld
  56. +311 −0 test/projects/test-task-project/web-app/WEB-INF/tld/spring.tld
  57. +109 −0 test/projects/test-task-project/web-app/css/errors.css
  58. +596 −0 test/projects/test-task-project/web-app/css/main.css
  59. +82 −0 test/projects/test-task-project/web-app/css/mobile.css
  60. BIN test/projects/test-task-project/web-app/images/apple-touch-icon-retina.png
  61. BIN test/projects/test-task-project/web-app/images/apple-touch-icon.png
  62. BIN test/projects/test-task-project/web-app/images/favicon.ico
  63. BIN test/projects/test-task-project/web-app/images/grails_logo.jpg
  64. BIN test/projects/test-task-project/web-app/images/grails_logo.png
  65. BIN test/projects/test-task-project/web-app/images/leftnav_btm.png
  66. BIN test/projects/test-task-project/web-app/images/leftnav_midstretch.png
  67. BIN test/projects/test-task-project/web-app/images/leftnav_top.png
  68. BIN test/projects/test-task-project/web-app/images/skin/database_add.png
  69. BIN test/projects/test-task-project/web-app/images/skin/database_delete.png
  70. BIN test/projects/test-task-project/web-app/images/skin/database_edit.png
  71. BIN test/projects/test-task-project/web-app/images/skin/database_save.png
  72. BIN test/projects/test-task-project/web-app/images/skin/database_table.png
  73. BIN test/projects/test-task-project/web-app/images/skin/exclamation.png
  74. BIN test/projects/test-task-project/web-app/images/skin/house.png
  75. BIN test/projects/test-task-project/web-app/images/skin/information.png
  76. BIN test/projects/test-task-project/web-app/images/skin/shadow.jpg
  77. BIN test/projects/test-task-project/web-app/images/skin/sorted_asc.gif
  78. BIN test/projects/test-task-project/web-app/images/skin/sorted_desc.gif
  79. BIN test/projects/test-task-project/web-app/images/spinner.gif
  80. BIN test/projects/test-task-project/web-app/images/springsource.png
  81. +9 −0 test/projects/test-task-project/web-app/js/application.js
View
@@ -9,21 +9,22 @@
<classpathentry kind="src" path="grails-app/taglib"/>
<classpathentry kind="src" path="test/integration"/>
<classpathentry kind="src" path="test/unit"/>
- <classpathentry kind="src" path=".plugin-src-shiro-1.1.5-grails-app-conf"/>
- <classpathentry kind="src" path=".plugin-src-shiro-1.1.5-grails-app-i18n"/>
- <classpathentry kind="src" path=".plugin-src-shiro-1.1.5-grails-app-services"/>
- <classpathentry kind="src" path=".plugin-src-shiro-1.1.5-grails-app-taglib"/>
- <classpathentry kind="src" path=".plugin-src-shiro-1.1.5-src-java"/>
- <classpathentry kind="src" path=".plugin-src-shiro-1.1.5-src-groovy"/>
<classpathentry kind="src" path=".plugin-src-rest-client-builder-1.0.2-src-groovy"/>
- <classpathentry kind="src" path=".plugin-src-release-2.0.3-src-java"/>
- <classpathentry kind="src" path=".plugin-src-release-2.0.3-src-groovy"/>
+ <classpathentry kind="src" path=".plugin-src-release-2.0.4-src-java"/>
+ <classpathentry kind="src" path=".plugin-src-release-2.0.4-src-groovy"/>
<classpathentry kind="src" path=".plugin-src-rabbitmq-1.0.0.RC2-grails-app-conf"/>
<classpathentry kind="src" path=".plugin-src-rabbitmq-1.0.0.RC2-src-groovy"/>
<classpathentry kind="src" path=".plugin-src-quartz-1.0-RC2-grails-app-conf"/>
<classpathentry kind="src" path=".plugin-src-quartz-1.0-RC2-grails-app-services"/>
<classpathentry kind="src" path=".plugin-src-quartz-1.0-RC2-src-java"/>
<classpathentry kind="src" path=".plugin-src-quartz-1.0-RC2-src-groovy"/>
+ <classpathentry kind="src" path=".plugin-src-platform-core-1.0.M6-grails-app-conf"/>
+ <classpathentry kind="src" path=".plugin-src-platform-core-1.0.M6-grails-app-controllers"/>
+ <classpathentry kind="src" path=".plugin-src-platform-core-1.0.M6-grails-app-i18n"/>
+ <classpathentry kind="src" path=".plugin-src-platform-core-1.0.M6-grails-app-taglib"/>
+ <classpathentry kind="src" path=".plugin-src-platform-core-1.0.M6-grails-app-views"/>
+ <classpathentry kind="src" path=".plugin-src-platform-core-1.0.M6-src-java"/>
+ <classpathentry kind="src" path=".plugin-src-platform-core-1.0.M6-src-groovy"/>
<classpathentry kind="src" path=".plugin-src-hibernate-2.1.0-grails-app-i18n"/>
<classpathentry kind="src" path="grails-app/jobs"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
@@ -185,22 +186,20 @@
<attribute name="javadoc_location" value="file:/Users/fterrier/Projects/grails-2.1.0/doc/api/"/>
</attributes>
</classpathentry>
+ <classpathentry kind="var" path="GRAILS_IVYCACHE/org.springframework.amqp/spring-rabbit/jars/spring-rabbit-1.1.2.BUILD-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="GRAILS_IVYCACHE/org.springframework.amqp/spring-amqp/jars/spring-amqp-1.1.2.BUILD-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="GRAILS_IVYCACHE/com.rabbitmq/amqp-client/jars/amqp-client-2.8.4.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/org.hibernate/hibernate-core/jars/hibernate-core-3.6.10.Final.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/dom4j/dom4j/jars/dom4j-1.6.1.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/org.hibernate/hibernate-commons-annotations/jars/hibernate-commons-annotations-3.2.0.Final.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/org.quartz-scheduler/quartz/jars/quartz-1.8.4.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/org.springframework.retry/spring-retry/jars/spring-retry-1.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/commons-logging/commons-logging/jars/commons-logging-1.1.1.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.springframework.amqp/spring-rabbit/jars/spring-rabbit-1.1.2.BUILD-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.springframework.amqp/spring-amqp/jars/spring-amqp-1.1.2.BUILD-SNAPSHOT.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/com.rabbitmq/amqp-client/jars/amqp-client-2.8.4.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.shiro/shiro-core/bundles/shiro-core-1.1.0.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.shiro/shiro-web/bundles/shiro-web-1.1.0.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.shiro/shiro-ehcache/bundles/shiro-ehcache-1.1.0.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.shiro/shiro-quartz/bundles/shiro-quartz-1.1.0.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.opensymphony.quartz/quartz/jars/quartz-1.6.1.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.shiro/shiro-aspectj/bundles/shiro-aspectj-1.1.0.jar"/>
- <classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.shiro/shiro-spring/bundles/shiro-spring-1.1.0.jar"/>
+ <classpathentry kind="var" path="GRAILS_IVYCACHE/org.grails/grails-gdoc-engine/jars/grails-gdoc-engine-1.0.1.jar" sourcepath="/GRAILS_HOME/src/java">
+ <attributes>
+ <attribute name="javadoc_location" value="file:/Users/fterrier/Projects/grails-2.1.0/doc/api/"/>
+ </attributes>
+ </classpathentry>
<classpathentry kind="var" path="GRAILS_IVYCACHE/org.hibernate/hibernate-validator/jars/hibernate-validator-4.1.0.Final.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/javax.validation/validation-api/jars/validation-api-1.0.0.GA.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/javassist/javassist/jars/javassist-3.12.0.GA.jar"/>
@@ -240,6 +239,5 @@
<classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.tomcat.embed/tomcat-embed-core/jars/tomcat-embed-core-7.0.27.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.tomcat.embed/tomcat-embed-jasper/jars/tomcat-embed-jasper-7.0.27.jar"/>
<classpathentry kind="var" path="GRAILS_IVYCACHE/org.apache.tomcat.embed/tomcat-embed-logging-log4j/jars/tomcat-embed-logging-log4j-7.0.27.jar"/>
- <classpathentry exported="true" kind="con" path="GROOVY_DSL_SUPPORT"/>
<classpathentry kind="output" path="web-app/WEB-INF/classes"/>
</classpath>
View
@@ -11,3 +11,6 @@ target
*.zip
plugin.xml
eclipse_workspace_settings.epf
+**.DS_Store
+**.classpath.bak
+**.project.bak
View
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>tasks</name>
+ <name>rabbitmq-tasks</name>
<comment></comment>
<projects>
</projects>
@@ -18,84 +18,89 @@
</natures>
<linkedResources>
<link>
- <name>.plugin-src-shiro-1.1.5-grails-app-conf</name>
+ <name>.plugin-src-rest-client-builder-1.0.2-src-groovy</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/shiro-1.1.5/grails-app/conf</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/rest-client-builder-1.0.2/src/groovy</locationURI>
</link>
<link>
- <name>.plugin-src-shiro-1.1.5-grails-app-i18n</name>
+ <name>.plugin-src-release-2.0.4-src-java</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/shiro-1.1.5/grails-app/i18n</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/release-2.0.4/src/java</locationURI>
</link>
<link>
- <name>.plugin-src-shiro-1.1.5-grails-app-services</name>
+ <name>.plugin-src-release-2.0.4-src-groovy</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/shiro-1.1.5/grails-app/services</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/release-2.0.4/src/groovy</locationURI>
</link>
<link>
- <name>.plugin-src-shiro-1.1.5-grails-app-taglib</name>
+ <name>.plugin-src-rabbitmq-1.0.0.RC2-grails-app-conf</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/shiro-1.1.5/grails-app/taglib</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/rabbitmq-1.0.0.RC2/grails-app/conf</locationURI>
</link>
<link>
- <name>.plugin-src-shiro-1.1.5-src-java</name>
+ <name>.plugin-src-rabbitmq-1.0.0.RC2-src-groovy</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/shiro-1.1.5/src/java</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/rabbitmq-1.0.0.RC2/src/groovy</locationURI>
</link>
<link>
- <name>.plugin-src-shiro-1.1.5-src-groovy</name>
+ <name>.plugin-src-quartz-1.0-RC2-grails-app-conf</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/shiro-1.1.5/src/groovy</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/quartz-1.0-RC2/grails-app/conf</locationURI>
</link>
<link>
- <name>.plugin-src-rest-client-builder-1.0.2-src-groovy</name>
+ <name>.plugin-src-quartz-1.0-RC2-grails-app-services</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/rest-client-builder-1.0.2/src/groovy</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/quartz-1.0-RC2/grails-app/services</locationURI>
</link>
<link>
- <name>.plugin-src-release-2.0.3-src-java</name>
+ <name>.plugin-src-quartz-1.0-RC2-src-java</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/release-2.0.3/src/java</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/quartz-1.0-RC2/src/java</locationURI>
</link>
<link>
- <name>.plugin-src-release-2.0.3-src-groovy</name>
+ <name>.plugin-src-quartz-1.0-RC2-src-groovy</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/release-2.0.3/src/groovy</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/quartz-1.0-RC2/src/groovy</locationURI>
</link>
<link>
- <name>.plugin-src-rabbitmq-1.0.0.RC2-grails-app-conf</name>
+ <name>.plugin-src-platform-core-1.0.M6-grails-app-conf</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/rabbitmq-1.0.0.RC2/grails-app/conf</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/platform-core-1.0.M6/grails-app/conf</locationURI>
</link>
<link>
- <name>.plugin-src-rabbitmq-1.0.0.RC2-src-groovy</name>
+ <name>.plugin-src-platform-core-1.0.M6-grails-app-controllers</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/rabbitmq-1.0.0.RC2/src/groovy</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/platform-core-1.0.M6/grails-app/controllers</locationURI>
</link>
<link>
- <name>.plugin-src-quartz-1.0-RC2-grails-app-conf</name>
+ <name>.plugin-src-platform-core-1.0.M6-grails-app-i18n</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/quartz-1.0-RC2/grails-app/conf</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/platform-core-1.0.M6/grails-app/i18n</locationURI>
</link>
<link>
- <name>.plugin-src-quartz-1.0-RC2-grails-app-services</name>
+ <name>.plugin-src-platform-core-1.0.M6-grails-app-taglib</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/quartz-1.0-RC2/grails-app/services</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/platform-core-1.0.M6/grails-app/taglib</locationURI>
</link>
<link>
- <name>.plugin-src-quartz-1.0-RC2-src-java</name>
+ <name>.plugin-src-platform-core-1.0.M6-grails-app-views</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/quartz-1.0-RC2/src/java</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/platform-core-1.0.M6/grails-app/views</locationURI>
</link>
<link>
- <name>.plugin-src-quartz-1.0-RC2-src-groovy</name>
+ <name>.plugin-src-platform-core-1.0.M6-src-java</name>
+ <type>2</type>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/platform-core-1.0.M6/src/java</locationURI>
+ </link>
+ <link>
+ <name>.plugin-src-platform-core-1.0.M6-src-groovy</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/quartz-1.0-RC2/src/groovy</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/platform-core-1.0.M6/src/groovy</locationURI>
</link>
<link>
<name>.plugin-src-hibernate-2.1.0-grails-app-i18n</name>
<type>2</type>
- <locationURI>GRAILS_WORKDIR/projects/tasks/plugins/hibernate-2.1.0/grails-app/i18n</locationURI>
+ <locationURI>GRAILS_WORKDIR/projects/rabbitmq-tasks/plugins/hibernate-2.1.0/grails-app/i18n</locationURI>
</link>
</linkedResources>
</projectDescription>
@@ -1,6 +1,6 @@
class RabbitmqTasksGrailsPlugin {
// the plugin version
- def version = "0.4"
+ def version = "0.5"
// the version or versions of Grails the plugin is designed for
def grailsVersion = "1.3.3 > *"
// the other plugins this plugin depends on
@@ -1,5 +1,4 @@
#Grails Metadata file
-#Fri Sep 14 08:39:24 CAT 2012
+#Tue Oct 09 15:36:30 CAT 2012
app.grails.version=2.1.0
app.name=rabbitmq-tasks
-plugins.eclipse-scripts=1.0.6
@@ -49,12 +49,10 @@ grails.project.dependency.resolution = {
export = false
}
- compile (":shiro:1.1.4")
+ compile (":platform-core:1.0.M6")
compile (":quartz:1.0-RC2")
compile (":rabbitmq:1.0.0.RC2")
- test (":spock:0.6") {
- export = false
- }
+ test (":spock:0.6")
}
}
@@ -10,7 +10,6 @@ import java.util.zip.ZipOutputStream;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.NotImplementedException
-import org.apache.shiro.SecurityUtils;
import org.chai.task.Task.TaskStatus
import org.codehaus.groovy.grails.commons.ConfigurationHolder;
import org.springframework.web.multipart.MultipartFile
@@ -186,7 +185,7 @@ class TaskController {
private def fillFields(def task) {
// we fill the default fields
task.status = TaskStatus.NEW
- task.principal = SecurityUtils.subject.principal
+ task.principal = securityIdentity
task.added = new Date()
}
@@ -1,30 +0,0 @@
-package org.chai.task
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import javax.servlet.ServletRequest;
-
-import net.sf.json.JSONException;
-import net.sf.json.JSONObject;
-import net.sf.json.JSONSerializer;
-
-import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.mgt.SecurityManager;
-import org.apache.shiro.subject.Subject;
-import org.apache.shiro.util.ThreadContext;
-import org.apache.shiro.web.util.WebUtils;
-
-import grails.plugin.spock.IntegrationSpec;
-
-abstract class IntegrationTests extends IntegrationSpec {
-
- def setupSecurityManager(def principal) {
- def subject = [getPrincipal: { principal }, isAuthenticated: { user==null?false:true }, login: { token -> null }] as Subject
- ThreadContext.put( ThreadContext.SECURITY_MANAGER_KEY, [ getSubject: { subject } ] as SecurityManager )
- SecurityUtils.metaClass.static.getSubject = { subject }
- WebUtils.metaClass.static.getSavedRequest = { ServletRequest request -> null }
- }
-
-}
Oops, something went wrong.

0 comments on commit 30a685d

Please sign in to comment.