ndr_ui 2.1.1 → 2.2.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: b6f096a99d6497432a68a4d9f0b8b136e18b032d4492a9db7f68b6f599e23659
4
- data.tar.gz: afa294bc04877c1e805baf95a04fae23107c07c33fe2015302d2004264d47735
3
+ metadata.gz: d9251b6829a45855bbf3b52573285d8cf1621c4355054a478753febec951e832
4
+ data.tar.gz: '043978f3db1be0bffbb30dba0f35425ed1c45286534f5ed3de2a32682c6b22d3'
5
5
  SHA512:
6
- metadata.gz: 76bf0eec7211d4c0aa55321495cdb54fa19897e1cdcfd7194c2acbd87afccbf6c0b2bd31abf1199e4791083d11e41eef35dd60cebbc16430f851ddea321da328
7
- data.tar.gz: 4cd0dcd9fb8b8bca3035c8a52956a49bf3ed4a29212e2169ca2b29f7bc7b9d1ec7776c75ecdefbf69df062beddb1a6cdf19fd270e987acbfb06f9d75f9f020d4
6
+ metadata.gz: b56e1411e9a349b27807911e621dcded460372439c03da2c62db2ff6c1168cf0c5ca2e20c23d985dd44ab3741095e3169238aba5dafc2c3aaf4951585ea54e68
7
+ data.tar.gz: ac80973afb0c69e59c148020658ba988316cb55c022cf39306ffd077244f1adf0987b8eb300199e91704bb00b92727c61504094599f1b3df0ff6fa8b848c3f40
@@ -448,7 +448,7 @@ module NdrUi
448
448
  # </a>
449
449
  #
450
450
  def details_link(path, options = {})
451
- return unless ndr_can?(:read, path)
451
+ return unless options[:skip_authorization] || ndr_can?(:read, path)
452
452
 
453
453
  link_to_with_icon({ icon: 'share-alt', title: 'Details', path: path }.merge(options))
454
454
  end
@@ -467,7 +467,7 @@ module NdrUi
467
467
  # </a>
468
468
  #
469
469
  def edit_link(path, options = {})
470
- return unless ndr_can?(:edit, path)
470
+ return unless options[:skip_authorization] || ndr_can?(:edit, path)
471
471
 
472
472
  path = edit_polymorphic_path(path) if path.is_a?(ActiveRecord::Base)
473
473
 
@@ -488,7 +488,7 @@ module NdrUi
488
488
  # <span class="glyphicon glyphicon-trash icon-white"></span>
489
489
  # </a>'
490
490
  def delete_link(path, options = {})
491
- return unless ndr_can?(:delete, path)
491
+ return unless options[:skip_authorization] || ndr_can?(:delete, path)
492
492
 
493
493
  defaults = {
494
494
  icon: 'trash icon-white', title: 'Delete', path: path,
@@ -2,5 +2,5 @@
2
2
 
3
3
  # This stores the current version of the NdrUi gem. Use semantic versioning http://semver.org
4
4
  module NdrUi
5
- VERSION = '2.1.1'.freeze
5
+ VERSION = '2.2.0'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ndr_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - NDR Development Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-16 00:00:00.000000000 Z
11
+ date: 2019-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails