shibboleth-rails 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/.project ADDED
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>Shib Rails</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>com.aptana.ide.core.unifiedBuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ </buildSpec>
14
+ <natures>
15
+ <nature>org.radrails.rails.core.railsnature</nature>
16
+ <nature>com.aptana.ruby.core.rubynature</nature>
17
+ </natures>
18
+ </projectDescription>
@@ -8,8 +8,9 @@ module Shibboleth::Rails
8
8
  end
9
9
 
10
10
  def shibboleth
11
- {:emplid => request.env['employeeNumber'],
12
- :name_n => request.env['REMOTE_USER'].chomp("@osu.edu")}
11
+ {:emplid => request.env['employeeNumber'],
12
+ :name_n => request.env['REMOTE_USER'].chomp("@osu.edu"),
13
+ :affiliations => request.env['affiliation']}
13
14
  end
14
15
 
15
16
  def current_user
@@ -13,7 +13,7 @@ module Shibboleth::Rails
13
13
  # names change due to marriage, etc.
14
14
  # update_attribute is a NOOP if not different
15
15
  user.update_attribute(:name_n, identity[:name_n])
16
-
16
+ user.update_role(identity[:affiliations]) if user.respond_to?(:update_role)
17
17
  user
18
18
  end
19
19
  end
@@ -1,5 +1,5 @@
1
1
  module Shibboleth
2
2
  module Rails
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shibboleth-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 4
10
- version: 0.3.4
9
+ - 5
10
+ version: 0.3.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - mikegee
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-27 00:00:00 Z
18
+ date: 2011-12-05 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails
@@ -43,6 +43,7 @@ extra_rdoc_files: []
43
43
 
44
44
  files:
45
45
  - .gitignore
46
+ - .project
46
47
  - Gemfile
47
48
  - README.md
48
49
  - Rakefile