thecore_auth_commons 2.2.9 → 2.3.0

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
  SHA256:
3
- metadata.gz: d2f4551c74847a97b20746c7d6fe8f506c0487bb66130ccf2f538861a4b3b540
4
- data.tar.gz: b51b6195a574ce071def2bfa57cedc89ccd6ec956856ffd10ad06d7637486f60
3
+ metadata.gz: 502bc9400ed04c0c637b9298e1997c8f310535d76edb06324bf495b044e32267
4
+ data.tar.gz: bc1d951e09c235f4907a6f67bf287fdb3d4703f47b4b32c4662e0d2b2b95c337
5
5
  SHA512:
6
- metadata.gz: d7a8de8a9f649e48038ef88298be54ee30cf0b0e88f7bc13d5ff9aee32a13173635e27f33525a1d07e9a757705ba8ce2f6df088cdbff11268553cb9896722532
7
- data.tar.gz: 227d2a0a72f2c21703946f979d9cad4196b12d3c45c2fdb4af82b3d1e63a45b537e5e287c1af83b991f39f2fee503fbe4dbba267e4dd49925fa0fecf08908789
6
+ metadata.gz: 4cad4cd8fb0864c65afb9b14dfcafe7f89209f8607d608de029ed8128f470f42c57c6dcdee1aa0bc2706e4f42a83119ce7c3e87dd50e47fdea316b90ae4a3729
7
+ data.tar.gz: 9de160e2037cae69e75dd41a520b6bad75ab7445136a337328288dd3bcd3e1e15cbd91e0bfd080a7232908f57958cf658df298068052bb9cb0164d267fbf87ab
@@ -44,6 +44,6 @@ class Ability
44
44
  ::Permission.joins(roles: :users).where(users: {id: user.id}).order(:id).each do |permission|
45
45
  # E.g. can :manage, :all
46
46
  self.send(permission.predicate.name.to_sym, permission.action.name.to_sym, (permission.target.name.classify.constantize rescue permission.target.name.to_sym))
47
- end
47
+ end unless user.blank?
48
48
  end
49
49
  end
data/app/models/user.rb CHANGED
@@ -37,7 +37,6 @@ class User < ApplicationRecord
37
37
  end
38
38
 
39
39
  def authenticate password
40
- puts "PASSWORD: #{password}"
41
40
  self&.valid_password?(password) ? self : nil
42
41
  end
43
42
 
@@ -1,3 +1,3 @@
1
1
  module ThecoreAuthCommons
2
- VERSION = "#{`git describe --tags $(git rev-list --tags --max-count=1)`}"
2
+ VERSION = "#{`git describe --tags $(git rev-list --tags --max-count=1)`.chomp}"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_auth_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.9
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-03 00:00:00.000000000 Z
11
+ date: 2021-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails