motor-admin 0.2.10 → 0.2.11

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: 5e7ce842fbd5202f73efe93edfea13a5391070ed46a44c4c7d15d9ed3ad68aed
4
- data.tar.gz: cb7dee7ba4ca6b4542bf6d333eb04f2de1c4409a795d1530ac3c81e76cfb4dce
3
+ metadata.gz: 3a5b90096b26ecbc08a8db9eab674f5eb73968cbd3e67fef43c476142f75543e
4
+ data.tar.gz: fba671589698de0216d59280c9935f940705d12c837808beed32e5de64dec443
5
5
  SHA512:
6
- metadata.gz: 468b9e8e9a4adab3e1006796e87894ca73e339e3663e9e2a61337512e305e5e22df787a260f49604c10c14934c1022164efda71fc59619848ee9f655e065e421
7
- data.tar.gz: c31e7faea409f3e78ea2f6840d2b3cdc8aa6ae82cbc831edee65b7220777503c52d745f7ce78a74b21f2caca147bb6a7f5f38b154b7b4409c8a67be529286fac
6
+ metadata.gz: 64046834ea3379dc2e79b1261b985fff168c5c52d19cd2540b6e951d0d669816a78fa21ac544a9cf4b82f81425f73917db39430e42b04d12db66279a3c159a62
7
+ data.tar.gz: 22c5025d749429478eb6f2d2d74a2264cbe5153a42b32b6cb2986ed1d694714cfce007a8751cea224748e7521ee5efe40f1ff06531d185e475b8e2a0fe58dce6
@@ -22,7 +22,11 @@ module Motor
22
22
  rescue_from CanCan::AccessDenied do |e|
23
23
  Rails.logger.error(e)
24
24
 
25
- render json: { errors: [e.message] }, status: :forbidden
25
+ if params[:action].in?(%w[create update destroy])
26
+ render json: { errors: [I18n.t('motor.not_authorized_to_perform_action')] }, status: :forbidden
27
+ else
28
+ render json: { errors: [e.message] }, status: :forbidden
29
+ end
26
30
  end
27
31
  end
28
32
  end
@@ -265,3 +265,4 @@ en:
265
265
  audio: Audio
266
266
  video: Video
267
267
  display_column: Display column
268
+ not_authorized_to_perform_action: You are not authorized to perform this action.
@@ -265,6 +265,7 @@ es:
265
265
  audio: Audio
266
266
  video: Video
267
267
  display_column: Columna de visualización
268
+ not_authorized_to_perform_action: No está autorizado a realizar esta acción.
268
269
  i:
269
270
  locale: es
270
271
  select:
@@ -261,6 +261,7 @@ pt:
261
261
  audio: Áudio
262
262
  video: Vídeo
263
263
  display_column: Coluna de exibição
264
+ not_authorized_to_perform_action: Não está autorizado a realizar esta acção.
264
265
  i:
265
266
  locale: pt
266
267
  select:
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.2.10'
4
+ VERSION = '0.2.11'
5
5
  end
@@ -2601,9 +2601,9 @@
2601
2601
  "icons/zoom-out.svg.gz": "icons/zoom-out.svg.gz",
2602
2602
  "icons/zoom-question.svg": "icons/zoom-question.svg",
2603
2603
  "icons/zoom-question.svg.gz": "icons/zoom-question.svg.gz",
2604
- "main-9d527c31af98f3d09fea.css.gz": "main-9d527c31af98f3d09fea.css.gz",
2605
- "main-9d527c31af98f3d09fea.js.LICENSE.txt": "main-9d527c31af98f3d09fea.js.LICENSE.txt",
2606
- "main-9d527c31af98f3d09fea.js.gz": "main-9d527c31af98f3d09fea.js.gz",
2607
- "main.css": "main-9d527c31af98f3d09fea.css",
2608
- "main.js": "main-9d527c31af98f3d09fea.js"
2604
+ "main-192e078f9e813b1ffe93.css.gz": "main-192e078f9e813b1ffe93.css.gz",
2605
+ "main-192e078f9e813b1ffe93.js.LICENSE.txt": "main-192e078f9e813b1ffe93.js.LICENSE.txt",
2606
+ "main-192e078f9e813b1ffe93.js.gz": "main-192e078f9e813b1ffe93.js.gz",
2607
+ "main.css": "main-192e078f9e813b1ffe93.css",
2608
+ "main.js": "main-192e078f9e813b1ffe93.js"
2609
2609
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motor-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-15 00:00:00.000000000 Z
11
+ date: 2021-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter
@@ -1524,8 +1524,8 @@ files:
1524
1524
  - ui/dist/icons/zoom-money.svg.gz
1525
1525
  - ui/dist/icons/zoom-out.svg.gz
1526
1526
  - ui/dist/icons/zoom-question.svg.gz
1527
- - ui/dist/main-9d527c31af98f3d09fea.css.gz
1528
- - ui/dist/main-9d527c31af98f3d09fea.js.gz
1527
+ - ui/dist/main-192e078f9e813b1ffe93.css.gz
1528
+ - ui/dist/main-192e078f9e813b1ffe93.js.gz
1529
1529
  - ui/dist/manifest.json
1530
1530
  homepage:
1531
1531
  licenses: