maestrano-connector-rails 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecb5e0b3c1b1cba58c3e8d59cf9482e9f2d7e8ae
4
- data.tar.gz: 370650bd45310a4aa5c38fb8adb275d8807c77e2
3
+ metadata.gz: d94d15e3a6fd70083f95437d043eaa3a75483798
4
+ data.tar.gz: 265289bdb90adbc369999c37e22b0614b4793c9a
5
5
  SHA512:
6
- metadata.gz: 0e1c2fa672cdcacb98241508eac191fdf2c8285da9c839384bf8ca43cd4b348959e0a4b0eedfb1f2a565c3604f385c051e95c42beeaf0864ed290ff3afbe6401
7
- data.tar.gz: 2226a0f6777653327da0d79d6a4023a7d01e2385ce94c74eee95b28b7f92bdc1ef948ba513e277358d5ae0b747af4d61c2aba8ea97842fd4fd22dc6c49ad12a3
6
+ metadata.gz: 5876b376594568daf87136ffe2db59812f25d023def013a2419f8e4e1a8bd47b51d0b971c7584d7ee7b869821d7db91a47ea5b92178ceece70c2a3f284b3c9b6
7
+ data.tar.gz: 10e5113d838dbd8a9bfbb282955a4b9ad715772289d2a4afd510d5e542612157fcdef2a2303bbf0bbb0c677f04c1c3fb01ffb0d062855655bfff670b80f5f1cf
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -1,16 +1,14 @@
1
1
  class Maestrano::Auth::SamlController < Maestrano::Rails::SamlBaseController
2
+
3
+ def init
4
+ session[:settings] = !!params[:settings]
5
+ super
6
+ end
7
+
2
8
  #== POST '/maestrano/auth/saml/consume'
3
9
  # Final phase of the Single Sign-On handshake. Find or create
4
10
  # the required resources (user and group) and sign the user
5
11
  # in
6
- #
7
- # This action is left to you to customize based on your application
8
- # requirements. Below is presented a potential way of writing
9
- # the action.
10
- #
11
- # Assuming you have enabled maestrano on a user model
12
- # called 'User' and a group model called 'Organization'
13
- # the action could be written the following way
14
12
  def consume
15
13
  params[:tenant] ||= 'default'
16
14
  user = Maestrano::Connector::Rails::User.find_or_create_for_maestrano(user_auth_hash, params[:tenant])
@@ -25,7 +23,16 @@ class Maestrano::Auth::SamlController < Maestrano::Rails::SamlBaseController
25
23
  session[:org_uid] = organization.uid
26
24
  session[:"role_#{organization.uid}"] = user_group_rel_hash[:role]
27
25
  end
28
-
29
- redirect_to main_app.root_path
26
+
27
+ if session[:settings]
28
+ session.delete(:setting)
29
+ redirect_to main_app.root_path
30
+ else
31
+ if current_organization && current_organization.oauth_uid && current_organization.sync_enabled
32
+ redirect_to main_app.home_redirect_to_external_path
33
+ else
34
+ redirect_to main_app.root_path
35
+ end
36
+ end
30
37
  end
31
38
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: maestrano-connector-rails 0.3.5 ruby lib
5
+ # stub: maestrano-connector-rails 0.3.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "maestrano-connector-rails"
9
- s.version = "0.3.5"
9
+ s.version = "0.3.6"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Pierre Berard"]
14
- s.date = "2016-03-21"
14
+ s.date = "2016-03-29"
15
15
  s.description = "Maestrano is the next generation marketplace for SME applications. See https://maestrano.com for details."
16
16
  s.email = "pierre.berard@maestrano.com"
17
17
  s.executables = ["rails"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maestrano-connector-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre Berard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-21 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: maestrano-rails