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 +4 -4
- data/lib/motor/build_schema/apply_permissions.rb +5 -0
- data/lib/motor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0c6bf1ba348b8b9625082430ffbd22c2a03f5698e50b76c66f91182df076090
|
4
|
+
data.tar.gz: f4f60a205720472d9b1929ac9ec976000e9f180093d77a821d6771f773372bd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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