Permalink
Browse files

allow '.', '-', '_' in login string. new version'

  • Loading branch information...
1 parent 4ce5b42 commit 5c9ed22cd40e22b44e5b354cc7df6163a288e7e8 @mkristian committed Feb 13, 2011
View
2 ixtlan-core/ixtlan.gemspec
@@ -1,7 +1,7 @@
# create by maven - leave it as is
Gem::Specification.new do |s|
s.name = 'ixtlan'
- s.version = '0.4.2'
+ s.version = '0.4.3'
s.summary = 'ixtlan plugins for rails and datamapper'
s.description = 'this is set of rails and datamapper plugins for setting up a little more advanced rails application then the default rails generator does. the focus is on security and privacy as well a complete restful xml support.'
View
145 ixtlan-core/ixtlan.gemspec.pom
@@ -0,0 +1,145 @@
+<?xml version="1.0"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>rubygems</groupId>
+ <artifactId>ixtlan</artifactId>
+ <version>0.4.2</version>
+ <packaging>gem</packaging>
+ <name><![CDATA[ixtlan plugins for rails and datamapper]]></name>
+ <description><![CDATA[this is set of rails and datamapper plugins for setting up a little more advanced rails application then the default rails generator does. the focus is on security and privacy as well a complete restful xml support.]]></description>
+ <url>http://github.com/mkristian/ixtlan/ixtlan-core</url>
+ <developers>
+ <developer>
+ <id>m.kristian</id>
+ <name>mkristian</name>
+ <email>m.kristian@web.de</email>
+ </developer>
+ </developers>
+ <licenses>
+ <license>
+ <name>MIT-LICENSE</name>
+ <url>./MIT-LICENSE</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <dependencies>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-core</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-validations</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-timestamps</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-migrations</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>slf4r</artifactId>
+ <version>[0.3.0,0.3.4)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>datamapper4rails</artifactId>
+ <version>[0.5.0,0.5.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>rack-datamapper</artifactId>
+ <version>[0.3.0,0.3.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>logging</artifactId>
+ <version>[1.2.3,1.2.99999.99999)</version>
+ <type>gem</type>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>dm-sqlite-adapter</artifactId>
+ <version>[1.0.0,1.0.99999.99999)</version>
+ <type>gem</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>rspec</artifactId>
+ <version>[1.3.0,1.3.99999.99999)</version>
+ <type>gem</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <repositories>
+ <repository>
+ <id>rubygems-releases</id>
+ <url>http://gems.saumya.de/releases</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>sonatype-nexus-snapshots</id>
+ <name>Sonatype Nexus Snapshots</name>
+ <url>http://oss.sonatype.org/content/repositories/snapshots</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <jruby.plugins.version>0.23.0-SNAPSHOT</jruby.plugins.version>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>de.saumya.mojo</groupId>
+ <artifactId>gem-maven-plugin</artifactId>
+ <version>${jruby.plugins.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <extraRdocFiles>History.txt,README.txt</extraRdocFiles>
+ <rdocOptions>--main,README.txt</rdocOptions>
+ <extraFiles>Rakefile</extraFiles>
+ <!--
+ <gemspecOverwrite>true</gemspecOverwrite>
+ -->
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>de.saumya.mojo</groupId>
+ <artifactId>rspec-maven-plugin</artifactId>
+ <version>${jruby.plugins.version}</version>
+ <executions>
+ <execution>
+ <goals><goal>test</goal></goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
2 ixtlan-core/lib/ixtlan/models/user.rb
@@ -144,7 +144,7 @@ def self.included(model)
model.property :id, ::DataMapper::Types::Serial, :field => "uidnumber"
- model.property :login, String, :required => true, :field => "uid", :length => 4..32, :unique_index => true, :format => /^[a-zA-Z0-9]*$/, :writer => :private
+ model.property :login, String, :required => true, :field => "uid", :length => 4..32, :unique_index => true, :format => /^[a-zA-Z0-9._-]*$/, :writer => :private
model.property :name, String, :required => true, :format => /^[^<">]*$/, :length => 2..64, :field => "cn"
View
2 ixtlan-core/lib/ixtlan/version.rb
@@ -1,3 +1,3 @@
module Ixtlan
- VERSION = '0.4.2'.freeze
+ VERSION = '0.4.3'.freeze
end
View
2 ixtlan-core/pom.xml
@@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>rubygems</groupId>
<artifactId>ixtlan</artifactId>
- <version>0.4.2</version>
+ <version>0.4.3</version>
<packaging>gem</packaging>
<name><![CDATA[ixtlan plugins for rails and datamapper]]></name>
<description><![CDATA[this is set of rails and datamapper plugins for setting up a little more advanced rails application then the default rails generator does. the focus is on security and privacy as well a complete restful xml support.]]></description>
View
6 ixtlan-core/spec/user_spec.rb
@@ -98,7 +98,7 @@
describe 'user_admin and locales/domains_admin' do
before(:each) do
- @admin = User.create(:login => 'admin_user', :email => 'admin_user@example.com', :name => 'admin', :current_user => @root)
+ @admin = User.first(:login => 'admin_user') || User.create(:login => 'admin_user', :email => 'admin_user@example.com', :name => 'admin', :current_user => @root)
@admin.groups << @users
@admin.groups << @locales
@admin.groups << @domains
@@ -112,7 +112,7 @@
end
it 'should be able to create an user' do
- u = User.new(:login => 'user', :email => 'user@example.com', :name => 'user', :current_user => @admin)
+ u = User.new(:login => 'user1', :email => 'user1@example.com', :name => 'user', :current_user => @admin)
u.update_all_children(@groups)
u.save
@@ -127,7 +127,7 @@
end
it 'should be able to create an user but ignore disallowed group root' do
- u = User.new(:login => 'user', :email => 'user@example.com', :name => 'user', :current_user => @admin)
+ u = User.new(:login => 'user2', :email => 'user2@example.com', :name => 'user', :current_user => @admin)
groups = @groups.dup
groups[:group] << { :id => @root_group.id.to_s }

0 comments on commit 5c9ed22

Please sign in to comment.