Permalink
Browse files

Add capability to use external authentication

upgrade 1.3.9
clean files
  • Loading branch information...
1 parent 11c6f3a commit 48e7fe9b801c5b0d6ef5ca2d36fa9df9d37f4c82 @vbarrier vbarrier committed Jun 5, 2012
Showing with 29 additions and 14,175 deletions.
  1. +2 −4 application.properties
  2. +1 −0 grails-app/domain/org/icescrum/core/domain/User.groovy
  3. +2 −0 grails-app/i18n/core.properties
  4. +2 −0 grails-app/i18n/core_fr.properties
  5. +18 −0 grails-app/migrations/org/icescrum/core/domain/UserMigration.groovy
  6. +1 −0 grails-app/services/org/icescrum/core/services/UserService.groovy
  7. +2 −0 grails-app/taglib/org/icescrum/core/taglib/FormTagLib.groovy
  8. +1 −1 src/groovy/org/icescrum/core/security/ScrumDetailsService.groovy
  9. +0 −42 web-app/WEB-INF/applicationContext.xml
  10. +0 −14 web-app/WEB-INF/sitemesh.xml
  11. +0 −563 web-app/WEB-INF/tld/c.tld
  12. +0 −671 web-app/WEB-INF/tld/fmt.tld
  13. +0 −550 web-app/WEB-INF/tld/grails.tld
  14. +0 −311 web-app/WEB-INF/tld/spring.tld
  15. +0 −273 web-app/css/main.css
  16. BIN web-app/images/favicon.ico
  17. BIN web-app/images/grails_logo.jpg
  18. BIN web-app/images/grails_logo.png
  19. BIN web-app/images/leftnav_btm.png
  20. BIN web-app/images/leftnav_midstretch.png
  21. BIN web-app/images/leftnav_top.png
  22. BIN web-app/images/skin/database_add.png
  23. BIN web-app/images/skin/database_delete.png
  24. BIN web-app/images/skin/database_edit.png
  25. BIN web-app/images/skin/database_save.png
  26. BIN web-app/images/skin/database_table.png
  27. BIN web-app/images/skin/exclamation.png
  28. BIN web-app/images/skin/house.png
  29. BIN web-app/images/skin/information.png
  30. BIN web-app/images/skin/shadow.jpg
  31. BIN web-app/images/skin/sorted_asc.gif
  32. BIN web-app/images/skin/sorted_desc.gif
  33. BIN web-app/images/spinner.gif
  34. BIN web-app/images/springsource.png
  35. +0 −13 web-app/js/application.js
  36. +0 −136 web-app/js/prototype/builder.js
  37. +0 −965 web-app/js/prototype/controls.js
  38. +0 −974 web-app/js/prototype/dragdrop.js
  39. +0 −1,123 web-app/js/prototype/effects.js
  40. +0 −4,874 web-app/js/prototype/prototype.js
  41. +0 −2,691 web-app/js/prototype/rico.js
  42. +0 −68 web-app/js/prototype/scriptaculous.js
  43. +0 −275 web-app/js/prototype/slider.js
  44. +0 −59 web-app/js/prototype/sound.js
  45. +0 −568 web-app/js/prototype/unittest.js
View
@@ -1,6 +1,4 @@
#Grails Metadata file
-#Wed May 30 18:28:27 CEST 2012
-app.grails.version=1.3.8
+#Mon Jun 04 16:39:23 CEST 2012
+app.grails.version=1.3.9
app.name=icescrum-core
-plugins.hibernate=1.3.8
-plugins.tomcat=1.3.8
@@ -49,6 +49,7 @@ class User implements Serializable, Attachmentable {
String uid
boolean enabled = true
+ boolean accountExternal = false
boolean accountExpired
boolean accountLocked
boolean passwordExpired
@@ -55,6 +55,7 @@ is.user.password.check=Passwords aren't the same
is.user.error.maxusers=Maximum number of users reached on iceScrum, we can't accept your registration
is.user.error.not.saved=The user is not saved
is.user.error.not.exist=The user does not exist
+is.user.error.externalAccount=External authentication, your password can't be reset in iceScrum
is.user.error.password.check=Passwords aren't the same
is.user.error.reset.password=Error, password has not been reset
is.user.success.register=Your account has been successfully added
@@ -65,6 +66,7 @@ is.user.preferences.error.not.filter=Incorrect filter
is.user.role.removed.product=You have been removed from the project:
is.user.role.added.product=You have been added to the project:
is.user.role.updated.product=Your role has changed on the project:
+is.user.accountExternal=External (LDAP)
user.email.email.invalid=Your email is invalid
user.firstName.blank=Your first name is required
user.lastName.blank=Your last name is required
@@ -58,7 +58,9 @@ is.user.role.added.product=Vous faites d\u00e9sormais partie du projet :
is.user.role.updated.product=Votre r\u00f4le a \u00e9t\u00e9 mis \u00e0 jour sur le projet :
is.user.error.not.saved=L'utilisateur n'est pas enregistr\u00e9
is.user.error.not.exist=L'utilisateur n'existe pas
+is.user.error.externalAccount=Authentification externe, votre mot de passe ne peut tre modifiŽ dans iceScrum
is.user.error.reset.password=Erreur : le password n'a pas \u00e9t\u00e9 r\u00e9initialis\u00e9
+is.user.accountExternal=Externe (LDAP)
user.firstName.blank=Erreur, votre pr\u00e9nom est obligatoire
user.lastName.blank=Erreur, votre nom est obligatoire
user.password.blank=Erreur, votre mot de passe est obligatoire
@@ -82,6 +82,24 @@ class UserMigration {
sql('UPDATE icescrum2_user set uid = MD5(CONCAT(username,email)) WHERE uid is NULL')
addNotNullConstraint(tableName:"icescrum2_user",columnName:'uid',columnDataType:'varchar(255)')
}
+
+ changeSet(id:'user_constraint_external_column', author:'vbarrier') {
+ preConditions(onFail:"MARK_RAN"){
+ not{
+ dbms(type:'mssql')
+ }
+ }
+ sql('UPDATE icescrum2_user set account_external = false WHERE account_external is NULL')
+ addNotNullConstraint(tableName:"icescrum2_user",columnName:'account_external',columnDataType:'BOOLEAN')
+ }
+
+ changeSet(id:'user_constraint_external_column_mssql', author:'vbarrier') {
+ preConditions(onFail:"MARK_RAN"){
+ dbms(type:'mssql')
+ }
+ sql('UPDATE icescrum2_user set account_external = 0 WHERE account_external is NULL')
+ addNotNullConstraint(tableName:"icescrum2_user",columnName:'account_external',columnDataType:'BIT')
+ }
}
}
@@ -192,6 +192,7 @@ class UserService {
accountExpired: user.accountExpired.text().toBoolean() ?: false,
accountLocked: user.accountLocked.text().toBoolean() ?: false,
passwordExpired: user.passwordExpired.text().toBoolean() ?: false,
+ accountExternal: user.accountExternal?.text()?.toBoolean() ?: false,
uid: user.@uid.text() ?: (user.username.text() + user.email.text()).encodeAsMD5()
)
@@ -405,6 +405,8 @@ class FormTagLib {
def typedAttrs = attrs.typed ?: null
attrs.remove('typed')
+ attrs.disabled ?: attrs.remove('disabled')
+
out << "<span id=\"${attrs.id}-field\" class=\"${attrs."class"}\">"
out << "<span class=\"start\"></span>"
out << "<span class=\"content\">"
@@ -43,7 +43,7 @@ class ScrumDetailsService extends GormUserDetailsService {
Class<?> User = grailsApplication.getDomainClass(conf.userLookup.userDomainClassName).clazz
User.withTransaction { status ->
- def user = User.findWhere((conf.userLookup.usernamePropertyName): username)
+ def user = User.findWhere((conf.userLookup.usernamePropertyName): username, accountExternal:false)
if (!user) {
log.warn "User not found: $username"
throw new UsernameNotFoundException('User not found', username)
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
-http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
-
- <bean id="grailsApplication" class="org.codehaus.groovy.grails.commons.GrailsApplicationFactoryBean">
- <description>Grails application factory bean</description>
- <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
- <property name="grailsResourceLoader" ref="grailsResourceLoader" />
- </bean>
-
- <bean id="pluginManager" class="org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean">
- <description>A bean that manages Grails plugins</description>
- <property name="grailsDescriptor" value="/WEB-INF/grails.xml" />
- <property name="application" ref="grailsApplication" />
- </bean>
-
- <bean id="grailsConfigurator" class="org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator">
- <constructor-arg>
- <ref bean="grailsApplication" />
- </constructor-arg>
- <property name="pluginManager" ref="pluginManager" />
- </bean>
-
- <bean id="grailsResourceLoader" class="org.codehaus.groovy.grails.commons.GrailsResourceLoaderFactoryBean">
- <property name="grailsResourceHolder" ref="grailsResourceHolder" />
- </bean>
-
- <bean id="grailsResourceHolder" scope="prototype" class="org.codehaus.groovy.grails.commons.spring.GrailsResourceHolder">
- <property name="resources">
- <value>classpath*:**/grails-app/**/*.groovy</value>
- </property>
- </bean>
-
- <bean id="characterEncodingFilter"
- class="org.springframework.web.filter.CharacterEncodingFilter">
- <property name="encoding">
- <value>utf-8</value>
- </property>
- </bean>
-</beans>
@@ -1,14 +0,0 @@
-<sitemesh>
- <page-parsers>
- <parser content-type="text/html"
- class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
- <parser content-type="text/html;charset=ISO-8859-1"
- class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
- <parser content-type="text/html;charset=UTF-8"
- class="org.codehaus.groovy.grails.web.sitemesh.GrailsHTMLPageParser" />
- </page-parsers>
-
- <decorator-mappers>
- <mapper class="org.codehaus.groovy.grails.web.sitemesh.GrailsLayoutDecoratorMapper" />
- </decorator-mappers>
-</sitemesh>
Oops, something went wrong.

0 comments on commit 48e7fe9

Please sign in to comment.