mdata 1.5.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/bin/mdata +5 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2c96e2f34af88520857c1428fac4b9bf96c4049
4
- data.tar.gz: f8732d5359e0e063a29c575ff63691c9bb1b6100
3
+ metadata.gz: 29f7789370fed592e064d323680a7c756eb8fba9
4
+ data.tar.gz: c0beed283877c34ae1471750df240aa1c7f6985b
5
5
  SHA512:
6
- metadata.gz: 30f5a97c1bb3be5d780903068f34de0c49f8150ae8e32ce217a0df228ab75c08e0501138db5b8184db697e0c3a41ee75131c063bee6e79c30a02adf149ebfe12
7
- data.tar.gz: 77999c4a15fd17e06a63aa61b2e5b2e6af18958b372e3957402f6fdc424feaad82ef78c27a0c89dc5275f17a25eed8c0b99274058bf5503c742ce30d64606bf4
6
+ metadata.gz: 20533b814ffeb7bfdf7868c163d487f797022e592576d43912426072a0cd6100ec3625302b0590021e64a52e29bb45291f8ea2a6c3c84be7faa7379630f44cff
7
+ data.tar.gz: c59d7b1a9ce900387cd5d3da37f4dd80cdc42d9b91537e56f4d70806b1bbb904878a095a5d28effbe8aeaae3c87aca3200cb5406c405c1a629fc711108b58169
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.5.0
1
+ 1.6.0
data/bin/mdata CHANGED
@@ -606,7 +606,7 @@ command :'profile objectPermissions:delete' do |c|
606
606
  c.summary = 'Completely removes the permissions for a particular object. Useful if an object is deleted.'
607
607
  c.option '--profile PROFILE', String, 'The profile to configure'
608
608
  c.option '--object OBJECT', String, 'The object to delete permissions for'
609
- c.option '--cascade', String, 'If true, will cascade deletion to fields on the object as well'
609
+ c.option '--cascade', String, 'If true, will cascade deletion to fields, tabs, and layouts for the object as well'
610
610
  c.action do |args, opts|
611
611
  begin
612
612
  raise ArgumentError, 'no profile specified' if opts.profile.nil?
@@ -614,6 +614,8 @@ command :'profile objectPermissions:delete' do |c|
614
614
  profile = Salesforce::Metadata::Profile.read opts.profile, opts.dir
615
615
  profile.objectPermissions.delete_if { |x| x.object == opts.object }
616
616
  profile.fieldPermissions.delete_if { |x| x.field.split('.')[0] == opts.object } unless opts.cascade.nil?
617
+ profile.layoutAssignments.delete_if { |x| x.layout.split('-')[0] == opts.object } unless opts.cascade.nil?
618
+ profile.tabVisibilities.delete_if { |x| x.tab == opts.object or x.tab == "standard-#{opts.object}" } unless opts.cascade.nil?
617
619
  profile.save
618
620
  rescue ArgumentError => e
619
621
  puts "Error executing command: #{e.message}"
@@ -746,7 +748,7 @@ command :'permissionset objectPermissions:delete' do |c|
746
748
  c.summary = 'Completely removes the permissions for a particular object. Useful if an object is deleted.'
747
749
  c.option '--permissionset PERMISSIONSET', String, 'The permissionset to configure'
748
750
  c.option '--object OBJECT', String, 'The object to delete permissions for'
749
- c.option '--cascade', String, 'If true, will cascade deletion to fields on the object as well'
751
+ c.option '--cascade', String, 'If true, will cascade deletion to fields and tabs for the object as well'
750
752
  c.action do |args, opts|
751
753
  begin
752
754
  raise ArgumentError, 'no permissionset specified' if opts.permissionset.nil?
@@ -754,6 +756,7 @@ command :'permissionset objectPermissions:delete' do |c|
754
756
  permissionset = Salesforce::Metadata::PermissionSet.read opts.permissionset, opts.dir
755
757
  permissionset.objectPermissions.delete_if { |x| x.object == opts.object }
756
758
  permissionset.fieldPermissions.delete_if { |x| x.field.split('.')[0] == opts.object } unless opts.cascade.nil?
759
+ permissionset.tabSettings.delete_if { |x| x.tab == opts.object or x.tab == "standard-#{opts.object}" } unless opts.cascade.nil?
757
760
  permissionset.save
758
761
  rescue ArgumentError => e
759
762
  puts "Error executing command: #{e.message}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Burwell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-28 00:00:00.000000000 Z
11
+ date: 2015-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander