motor-admin 0.4.13 → 0.4.14

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
  SHA256:
3
- metadata.gz: 7acb270663278a2adf90358d69bb0cbb01c3b6e67c8ff490568177faf7cc4909
4
- data.tar.gz: ec6363bdfe451eea2d247a14ffa1dbde1040a01f716dd3def9326a3b215dd3fd
3
+ metadata.gz: e0c6bf1ba348b8b9625082430ffbd22c2a03f5698e50b76c66f91182df076090
4
+ data.tar.gz: f4f60a205720472d9b1929ac9ec976000e9f180093d77a821d6771f773372bd5
5
5
  SHA512:
6
- metadata.gz: 2b2fbb4f9d84039afe065e6fec74aadfb2dea9b21faf28ebf6e50e8b12c98d204785118c4c2479465b47f92868415e5920e8492b9c2ee3010d8906fa07c4d967
7
- data.tar.gz: 183cecebf5b394c90bb76c58f0a5594cdc7ba995ec666cad3f1718fa8438bebd857011e0130bb6525621f680dded78382bd3c920f62d01de4d6896281818e5ec
6
+ metadata.gz: 0bc3d70fe81777dfe1d746e7927e4fe6157e9cba44bb3bc299145bf74ee5442d0ff659aad8207ff037f0fe03f4c9a483f74f45686f1d6e999a42d3447d8b22c3
7
+ data.tar.gz: ecf3822e18b2ed31a077cac4bb751aa7566cd2df11fc14fc593b0ac5b0aa95509789b21db050e3acb158a556674bf4b924ab87479d36afd09fea2f0288a2d7dd
@@ -45,6 +45,11 @@ module Motor
45
45
  next if reference_model_name &&
46
46
  (model_class.nil? || !ability.can?(:read, model_class))
47
47
 
48
+ if !ability.can?(:update, model, column[:name]) &&
49
+ column[:access_type] != BuildSchema::ColumnAccessTypes::HIDDEN
50
+ column = column.merge(access_type: BuildSchema::ColumnAccessTypes::READ_ONLY)
51
+ end
52
+
48
53
  column
49
54
  end.compact
50
55
  end
data/lib/motor/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motor
4
- VERSION = '0.4.13'
4
+ VERSION = '0.4.14'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motor-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka