any_login 1.2 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/any_login/application_controller.rb +1 -0
  3. data/app/helpers/any_login/application_helper.rb +1 -1
  4. data/app/views/any_login/_any_login.html.erb +1 -1
  5. data/lib/any_login/version.rb +1 -1
  6. data/lib/any_login.rb +4 -0
  7. data/lib/generators/any_login/templates/any_login.rb +4 -1
  8. data/test/dummy/db/development.sqlite3 +0 -0
  9. data/test/dummy/db/test.sqlite3 +0 -0
  10. data/test/dummy-clearance/db/development.sqlite3 +0 -0
  11. data/test/dummy-sorcery/db/development.sqlite3 +0 -0
  12. data/test/dummy-sorcery/db/test.sqlite3 +0 -0
  13. metadata +190 -286
  14. data/test/dummy/log/development.log +0 -577
  15. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/1l2LyYtD0hI8QJI83gSEdwWsnqaFREIwwRAqXquREMY.cache +0 -1
  16. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/3pTb9cnqbyj8oSbBnv-vO5Snw8FMgSpsEqhfftd6KM8.cache +0 -1
  17. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/3yE-3UxRSb92lmxKEe3nzM8Z_Vf6d_Roj2EepgIipuU.cache +0 -1
  18. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -2
  19. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/5SUIMnExoVRV3GoeFPxawWenxzrOwKGXImplodfwwCI.cache +0 -1
  20. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/5tfbkOk7kz2B9Wq517Qq5nvswY7auHKmehVwXakzcA4.cache +0 -1
  21. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/7YKzNk3StYSfhs1PfoAVc_p4zhJWUWcgfslaeP7DymI.cache +0 -2
  22. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/9Xc8YFlDJRwahzhOQ9-q0-FtnQcMniRnX8jJlHTROm8.cache +0 -1
  23. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/BoK9ZaXV2_XOoo6bAlglBquHv5a89zvdhRtdNolYCXo.cache +0 -1
  24. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/DYMo2KqDqPpYYk34Hq6rWOfqZo1B1qXLvl3AviyFGPw.cache +0 -1
  25. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/FBHo9LuH0xkwMXXXx95xeALLysZQEJGD_jAXz0L5D9c.cache +0 -0
  26. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/FX88kPZ5f6cigqVQnsAJPMmPZHiOSquoGHxBraF3wBw.cache +0 -1
  27. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Fgi2PW3c1qK1CS8Mp5xq_m4Frc-Y4fz6MgbB--5_DFg.cache +0 -1
  28. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/GAdJwtpszZDaIVjZ1vy_hhrduwyRVZ-UVvY1VWHC1F8.cache +0 -2
  29. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/HnJWWVsoOqTYHwQr-Gy7egC4IsXDdjChVyWbWOjlmgc.cache +0 -0
  30. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/JuRaZryTjozytJ6QtNrDs9Ztpl2qe6SAWAaFU6imUDI.cache +0 -1
  31. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Lx2bhWmbIDCMe8vDMUNpsIlkkCCFHKPNw1-HwIdIWdQ.cache +0 -0
  32. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/MLKbCeGwhby-1XDpfcviapurR55wM77HWyOxOancoBY.cache +0 -1
  33. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/MtEytd7IXhIL7sXltXO_0uGFVn2be7MyGRcD69Yafxs.cache +0 -0
  34. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -2
  35. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/RICxiF1Y7tRr1144F7mHmJPW-mEKzj8mvHddAM2tiiM.cache +0 -2
  36. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/S3EqSW38zoxYDLJ1vUbA8FV6CAASoaTTlf5O-DPLIgs.cache +0 -2
  37. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/VkpH9VGlbwn8Fyf2TiBlAdl6xLL2sZFEaAXTo8tS-2o.cache +0 -0
  38. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/VkuMfFtSkFFkUcATN-04iHP-s-v5rEmxRp1jTOxYX14.cache +0 -1
  39. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/WvJEdD_jylDB9YyTGFpZzS-qyJ31fNW5MGWEjQXeawA.cache +0 -1
  40. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/YpAXiE0iYtzGoYUWL2gjhdwuyyfxV3zRlPaOs65EvA4.cache +0 -0
  41. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ZcNFYJVZHS1ywHNoQu0-whD-PtDJYDHXyqokFni1_To.cache +0 -0
  42. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/bOhFGSPJwly_zNCFoiYuEURJuC8wTMdroIrqvvdzJyE.cache +0 -1
  43. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/czBq8lSXA4O5_ACmmkiL1SlqpzLV8eRZjay1h2uy5kw.cache +0 -2
  44. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/eICl2U0APexjemZ8VH-n979qKDMvux82Kz5wrHwir8A.cache +0 -0
  45. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/eTlt_zK_szP01EO9ncMyFTv2hPwcuzoFUM9JMP4zx04.cache +0 -3
  46. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/fpeHoSYPNIxuVWmz3_zN7Vbi23P-F3HPYv-XpKpLZFg.cache +0 -1
  47. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/kwrJPJzQnUZy6XwmBrFMJjah6mZ9qNB8nStiWPrGWhs.cache +0 -1
  48. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/l5rpSHE1xK2jT7OGZDVOzAUK0LgmIMJAhVJQGaGWQ00.cache +0 -2
  49. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/lsKTRokTALjhqUP8nDDj6V8jvbHJVJPipTCOOjDKfw4.cache +0 -1
  50. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/myQlTWBqjEV7aXVwBtOaHIt42To2MmC_zlFFqkPxjmw.cache +0 -2
  51. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pIVqc5tXAaLDSQbx4dvcFawX1iRPdcw_JTjDIE6Y0eM.cache +0 -2
  52. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/pnW3u_1AN48ig6ngefI89y96xoSlvnJurx-e3J-leoE.cache +0 -2
  53. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/qDNkKDUNVSrSAWT8yqnkWcqqtxLn4VA_kyk8JX1pKOU.cache +0 -1
  54. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/rMe4WSIdYZxZzf6ytZEwX4D2FQVl-k_kllIjENkdr5Y.cache +0 -1
  55. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/sAt_9KVZfT_YTHe9y4IBFzCdoFAoQ8brb8Wbr5tL-l8.cache +0 -1
  56. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/sYqD_6_DLhWbWmBm4ZOKDNI8bKtF7czThI6GXwmFlMU.cache +0 -2
  57. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/ssS2x0Wl67rwXHaVHsh6CO7ayn9fQ5saIwATKN6O-nI.cache +0 -2
  58. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/tuEq0SXuQh3A3UWa1dGXRLlKGMt6evB5YqwFJRyPvIE.cache +0 -2
  59. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/tyjlKBbOAljzASzhQfhe0yjrPF8DhNSR6yuZJwtpnxc.cache +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/vQGQDhJjTw7GdtpxUdJxGWjYX3EZ86LurWxLZduMM1M.cache +0 -1
  61. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/xCexSNESQ_s5_Nb67lUl0oXgCpdisNQNvtsR-hfgIAo.cache +0 -1
  62. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/xTXb5_po31AnnSwOAZzIBd1rBWcaxbd7j9_9hNkV0_Q.cache +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/y_A3ypCgGZQ8FZe7lgsxIk3UJq_xLEj0vfE_0Zk6TAY.cache +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/zM-SqqZxtaKXYoFAi8DR44e1ncQtUdxpxe__ZbKIHtE.cache +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/zkoaZXoHGyQAmw2tuBBZ-UDkNaF66JLZZb2PzsqZylA.cache +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20568f225a8efe5884f585653d3a4c6a8dc903c9
4
- data.tar.gz: 3844864cab8b9890ea36f7006c3002515687ea45
3
+ metadata.gz: 64e1b0b615f52338d5e2be2557428a7808af546a
4
+ data.tar.gz: cc4839e67e8870b98be1d7914cf57a3cd2bc2472
5
5
  SHA512:
6
- metadata.gz: 7ee4cff920af9d339601b373f67a162bdf645b35e86a3db438dc33d969ab9088739f413d192cf8cf7b88479fae5648f18dbbc9446df16cb7042a312442bd6dbc
7
- data.tar.gz: ef523b6321f70735afd6407eef3f0dacff0889260417039eeb9013274d78ea434c4e6d5e795466127eea395af49ecc1406ee74f48b42e5b22cf9c3d644abd272
6
+ metadata.gz: 7683f3fab6d75208fbaff94b9dffa1d5faaec1926fc4f45f10998e975c5cbacaeda0c8d55f4266e14945a5efcb878a805d58865c31995b733f057d28656ff10e
7
+ data.tar.gz: a92350d2ec713239f74977a6efd47f886943f286580b0c722c764460d26857c9d82ce1b578bffb42dc75f88a2d7f95fe72bfb5498fc86dd677b37d1895454cd2
@@ -10,6 +10,7 @@ module AnyLogin
10
10
 
11
11
 
12
12
  def any_login
13
+ head 403 && return unless AnyLogin.verify_access_proc.call(self)
13
14
  AnyLogin.provider::Controller.instance_method(:any_login_sign_in).bind(self).call
14
15
  end
15
16
  end
@@ -3,7 +3,7 @@ module AnyLogin
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  def any_login_here
6
- render 'any_login/any_login' if AnyLogin.enabled
6
+ render 'any_login/any_login' if AnyLogin.enabled && AnyLogin.verify_access_proc.call(self.controller)
7
7
  end
8
8
 
9
9
  if AnyLogin.enabled
@@ -127,4 +127,4 @@
127
127
  #any_login span#current_user_information span {
128
128
  display: inline;
129
129
  }
130
- </style>
130
+ </style>
@@ -1,3 +1,3 @@
1
1
  module AnyLogin
2
- VERSION = '1.2'
2
+ VERSION = '1.2.1'
3
3
  end
data/lib/any_login.rb CHANGED
@@ -69,6 +69,10 @@ module AnyLogin
69
69
  mattr_accessor :http_basic_authentication_password
70
70
  @@http_basic_authentication_password = 'password'
71
71
 
72
+ # Use controller proc condition
73
+ mattr_accessor :verify_access_proc
74
+ @@verify_access_proc = proc { |controller| true }
75
+
72
76
  def self.setup
73
77
  yield(self)
74
78
  end
@@ -42,5 +42,8 @@ AnyLogin.setup do |config|
42
42
  # config.http_basic_authentication_user_name = 'any_login'
43
43
 
44
44
  # # Enable http basic authentication
45
- # config.ttp_basic_authentication_password = 'password'
45
+ # config.http_basic_authentication_password = 'password'
46
+
47
+ # # Use controller proc condition
48
+ # config.verify_access_proc = proc { |controller| true }
46
49
  end
Binary file
Binary file
Binary file