ffcrm_google_oauth2 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f6535bec1dd94538e84d3860f1a41b29eebd131
4
- data.tar.gz: 644b0292353154f479a36f98a03afdbca894bc61
3
+ metadata.gz: ef68d609c13ffce8f1003588f6951161da4d730a
4
+ data.tar.gz: c146202a8cc38aabc2c201f4f379ad8ca34c284e
5
5
  SHA512:
6
- metadata.gz: c2742b93dd8cbb176446e007e6315ad9b5162de8a847a92b04249bf1e45f668a1da9c346883141f8916c4bade37f561514beb0a9afe7983364a0ef0adfbe0f05
7
- data.tar.gz: e397e2281dbff7e94ecb038e7333e5c048f8aff08285170f48cc54a3a8d6e417aef70747bad6098c038522097770a0d242818e44258c5f141df122e3c5117176
6
+ metadata.gz: 9a5ebb869efb815701129adc8039d70e22f15de4bb1e141f8cfc39890e294699f908eaeff379e32171a9cbf72aabac4e05fddae82e5dfb7fedbf541891bf8368
7
+ data.tar.gz: 1075f09223885aae5202cd19f28bdf6e1938d553851bd21b7890b47c48c471cd619ae43d5178355551c801a2427621844d2593c5e9f4efda0321553f177ddb71
@@ -1,21 +1,24 @@
1
1
  .standalone#standalone
2
2
  -# The following form gets submitted to #create when @authentication is nil,
3
3
  -# or to #update when @authentication is not nil (ex. suspended).
4
+
4
5
  = form_for @authentication, :url => authentication_path, :html => one_submit_only do |f|
5
- - if can_signup?
6
- .title_tools #{t :no_account} #{link_to t(:sign_up_now), signup_path}
7
- .title= t(:login)
8
- .section
9
- .label= t(:username) + ':'
10
- = f.text_field :username
11
- .label= t(:password) + ':'
12
- = f.password_field :password
6
+ - unless Setting.oauth_only
7
+ - if can_signup?
8
+ .title_tools #{t :no_account} #{link_to t(:sign_up_now), signup_path}
9
+ .title= t(:login)
10
+ .section
11
+ .label= t(:username) + ':'
12
+ = f.text_field :username
13
+ .label= t(:password) + ':'
14
+ = f.password_field :password
15
+
16
+ %div(style="margin-left:12px") #{f.check_box(:remember_me)} #{t :remember_me}
17
+ %br
18
+ .buttonbar
19
+ = f.submit t(:login)
20
+ #{t :or}
21
+ = link_to t(:forgot_password) << '?', new_password_path
13
22
 
14
- %div(style="margin-left:12px") #{f.check_box(:remember_me)} #{t :remember_me}
15
- %br
16
- .buttonbar
17
- = f.submit t(:login)
18
- #{t :or}
19
- = link_to t(:forgot_password) << '?', new_password_path
20
- %div(style="margin:24px 12px 0 12px;text-align: center;")
23
+ %div{:style => (Setting.oauth_only ? "margin:4px 12px 0 12px;text-align: center;" : "margin:24px 12px 0 12px;text-align: center;" )}
21
24
  = link_to (image_tag("google-signin-button.png",style: "width:246px;background-color: transparent;")), "/auth/google_oauth2/", style: "background-color:transparent! important;"
@@ -2,7 +2,7 @@ AuthenticationsController.class_eval do
2
2
  def callback
3
3
  auth_hash = request.env["omniauth.auth"]
4
4
  email = auth_hash[:info][:email]
5
- user = User.where("email ILIKE ?",email).first
5
+ user = User.where(User.arel_table[:email].matches(email)).first
6
6
  if user
7
7
  unless user.suspended?
8
8
  Authentication.create(user,true) # true - remember me
@@ -1,3 +1,3 @@
1
1
  module FfcrmGoogleOauth2
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffcrm_google_oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - DmitriySalko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-25 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fat_free_crm