@simplysf/simply-permissions 1.3.6 → 1.3.7

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.
Files changed (2) hide show
  1. package/README.md +29 -100
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @simplysf/simply-permissions
2
2
 
3
- [![NPM](https://img.shields.io/npm/v/@simplysf/simply-permissions?label=@simplysf/simply-permissions)](https://npmjs.com/@simplysf/simply-permissions) [![Downloads/week](https://img.shields.io/npm/dw/@simplysf/simply-permissions.svg)](https://npmjs.com/@simplysf/simply-permissions) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://raw.githubusercontent.com/SimplySF/simply-node/main/LICENSE.txt)
3
+ [![NPM](https://img.shields.io/npm/v/@simplysf/simply-permissions?label=@simplysf/simply-permissions)](https://npmjs.com/@simplysf/simply-permissions) [![Downloads/week](https://img.shields.io/npm/dw/@simplysf/simply-permissions.svg)](https://npmjs.com/@simplysf/simply-permissions) [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://raw.githubusercontent.com/SimplySF/simply-plugins/main/LICENSE.txt)
4
4
 
5
5
  ## Install
6
6
 
@@ -10,17 +10,18 @@ sf plugins install @simplysf/simply-permissions
10
10
 
11
11
  ## Issues
12
12
 
13
- Please report any issues at https://github.com/SimplySF/simply-node/issues
13
+ Please report any issues at https://github.com/SimplySF/simply-plugins/issues
14
14
 
15
15
  ## Contributing
16
16
 
17
- This package is part of the [`@simplysf/simply`](https://github.com/SimplySF/simply-node) monorepo. See the repo's [CONTRIBUTING.md](https://github.com/SimplySF/simply-node/blob/main/CONTRIBUTING.md) for the repo structure, how to set up and build the project, our commit conventions, and how to submit a pull request. Please also read our [Code of Conduct](https://github.com/SimplySF/simply-node/blob/main/CODE_OF_CONDUCT.md).
17
+ This package is part of the [`@simplysf/simply`](https://github.com/SimplySF/simply-plugins) monorepo. See the repo's [CONTRIBUTING.md](https://github.com/SimplySF/simply-plugins/blob/main/CONTRIBUTING.md) for the repo structure, how to set up and build the project, our commit conventions, and how to submit a pull request. Please also read our [Code of Conduct](https://github.com/SimplySF/simply-plugins/blob/main/CODE_OF_CONDUCT.md).
18
18
 
19
19
  ## Commands
20
20
 
21
21
  <!-- commands -->
22
22
 
23
23
  - [`sf simply permissions analyze`](#sf-simply-permissions-analyze)
24
+ - [`sf simply permissions assignment delete`](#sf-simply-permissions-assignment-delete)
24
25
  - [`sf simply permissions build`](#sf-simply-permissions-build)
25
26
 
26
27
  ## `sf simply permissions analyze`
@@ -65,122 +66,50 @@ FLAG DESCRIPTIONS
65
66
  The path to write the generated HTML report to.
66
67
  ```
67
68
 
68
- _See code: [lib/commands/simply/permissions/analyze.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-permissions@1.2.31/packages/simply-permissions/lib/commands/simply/permissions/analyze.js)_
69
+ _See code: [lib/commands/simply/permissions/analyze.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-permissions@1.3.6/packages/simply-permissions/lib/commands/simply/permissions/analyze.js)_
69
70
 
70
- ## `sf simply permissions build`
71
+ ## `sf simply permissions assignment delete`
71
72
 
72
- Generate a permission set from Salesforce source metadata.
73
+ Delete PermissionSetAssignments for one or more PermissionSets/PermissionSetGroups.
73
74
 
74
75
  ```
75
76
  USAGE
76
- $ sf simply permissions build --type read-only|view-all|modify-all -n <value> -d <value> --output <value> [--json]
77
- [--flags-dir <value>] [-c <value>] [--include-record-types] [--label <value>] [--description <value>]
77
+ $ sf simply permissions assignment delete -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-f <value>]
78
+ [--permission-set-name <value>...] [--permission-set-group-name <value>...]
78
79
 
79
80
  FLAGS
80
- -c, --config=<value> Path to a permission set configuration file
81
- -d, --directory=<value> (required) Path to the Salesforce project directory
82
- -n, --name=<value> (required) API name for the permission set
83
- --description=<value> Description for the permission set
84
- --include-record-types Include record type visibilities
85
- --label=<value> Label for the permission set
86
- --output=<value> (required) Output directory
87
- --type=<option> (required) Baseline permission type
88
- <options: read-only|view-all|modify-all>
81
+ -f, --file=<value> Path to a destructiveChanges.xml/package.xml-shaped file
82
+ -o, --target-org=<value> (required) Username or alias of the target org. Not required if the
83
+ `target-org` configuration variable is already set.
84
+ --api-version=<value> Override the api version used for api requests made by this command
85
+ --permission-set-group-name=<value>... PermissionSetGroup DeveloperName(s) to delete assignments for
86
+ --permission-set-name=<value>... PermissionSet Name(s) to delete assignments for
89
87
 
90
88
  GLOBAL FLAGS
91
89
  --flags-dir=<value> Import flag values from a directory.
92
90
  --json Format output as json.
93
91
 
94
92
  DESCRIPTION
95
- Generate a permission set from Salesforce source metadata.
96
-
97
- Scans a Salesforce project directory for custom objects, fields, tabs, and (optionally) record types, then generates a
98
- permission set XML file with a baseline of permissions determined by --type. An optional JSON --config file can
99
- override individual object, field, tab, record type, and user permission settings, as well as whether the permission
100
- set requires activation.
101
-
102
- EXAMPLES
103
- $ sf simply permissions build --type read-only --name My_Read_Only_Access --directory force-app --output force-app/main/default/permissionsets
104
-
105
- $ sf simply permissions build --type modify-all --name My_Admin_Access --directory force-app --config config/permission-overrides.json --output force-app/main/default/permissionsets --include-record-types
106
-
107
- FLAG DESCRIPTIONS
108
- -c, --config=<value> Path to a permission set configuration file
109
-
110
- The path to a JSON file that overrides individual object, field, tab, record type, and user permission settings, as
111
- well as whether the permission set requires activation, on top of the --type baseline.
112
-
113
- -d, --directory=<value> Path to the Salesforce project directory
114
-
115
- The path to the Salesforce source directory to scan for custom objects, fields, tabs, and record types.
116
-
117
- -n, --name=<value> API name for the permission set
118
-
119
- The API name for the generated permission set; also used to derive the output filename.
120
-
121
- --include-record-types Include record type visibilities
122
-
123
- Automatically include record type visibilities discovered from the source metadata, marked as visible by default.
124
-
125
- --output=<value> Output directory
126
-
127
- The directory to write the generated permission set XML file to.
93
+ Delete PermissionSetAssignments for one or more PermissionSets/PermissionSetGroups.
128
94
 
129
- --type=read-only|view-all|modify-all Baseline permission type
130
-
131
- The baseline permission level to generate: 'read-only' grants read access to all discovered objects and fields,
132
- 'view-all' additionally grants view-all-records, and 'modify-all' grants full CRUD and modify-all-records access.
133
- ```
134
-
135
- _See code: [lib/commands/simply/permissions/build.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-permissions@1.2.31/packages/simply-permissions/lib/commands/simply/permissions/build.js)_
136
- <!-- commandsstop -->
137
-
138
- - [`sf simply permissions analyze`](#sf-simply-permissions-analyze)
139
- - [`sf simply permissions build`](#sf-simply-permissions-build)
140
-
141
- ## `sf simply permissions analyze`
142
-
143
- Analyze permission sets and permission set groups in an org.
144
-
145
- ```
146
- USAGE
147
- $ sf simply permissions analyze -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [-f <value>...] [--output
148
- <value>]
149
-
150
- FLAGS
151
- -f, --filter=<value>... Permission set or group names to include
152
- -o, --target-org=<value> (required) Username or alias of the target org. Not required if the `target-org`
153
- configuration variable is already set.
154
- --api-version=<value> Override the api version used for api requests made by this command
155
- --output=<value> [default: permissions_report.html] Output HTML file path
156
-
157
- GLOBAL FLAGS
158
- --flags-dir=<value> Import flag values from a directory.
159
- --json Format output as json.
160
-
161
- DESCRIPTION
162
- Analyze permission sets and permission set groups in an org.
95
+ Deletes every `PermissionSetAssignment` against the named `PermissionSet`s and/or `PermissionSetGroup`s — the pre-step
96
+ a destructive metadata deploy of the permission set/group itself needs, so it doesn't fail or leave orphaned
97
+ assignments behind.
163
98
 
164
- Generates an HTML report of every permission set and permission set group in the target org, grouped by installed
165
- package, including their object and field permissions.
99
+ Targets can be named either via `--file`, pointing at a `destructiveChanges.xml`/`package.xml`-shaped file whose
100
+ `PermissionSet`/`PermissionSetGroup` type members are the targets, or via
101
+ `--permission-set-name`/`--permission-set-group-name` flags (which may be combined with each other) for scripted or
102
+ one-off use. `--file` is mutually exclusive with the two explicit-name flags.
166
103
 
167
104
  EXAMPLES
168
- $ sf simply permissions analyze --target-org myOrg
169
-
170
- $ sf simply permissions analyze --target-org myOrg --output reports/permissions.html --filter My_Permission_Set --filter Another_Set
105
+ $ sf simply permissions assignment delete --file destructive/pre/destructiveChanges.xml --target-org myOrg
171
106
 
172
- FLAG DESCRIPTIONS
173
- -f, --filter=<value>... Permission set or group names to include
107
+ $ sf simply permissions assignment delete --permission-set-name My_Permission_Set --target-org myOrg
174
108
 
175
- One or more PermissionSet (Name) or PermissionSetGroup (DeveloperName) API names to restrict the report to. If
176
- omitted, all permission sets and groups are included.
177
-
178
- --output=<value> Output HTML file path
179
-
180
- The path to write the generated HTML report to.
109
+ $ sf simply permissions assignment delete --permission-set-group-name My_Permission_Set_Group --target-org myOrg
181
110
  ```
182
111
 
183
- _See code: [lib/commands/simply/permissions/analyze.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-permissions@1.2.13/packages/simply-permissions/lib/commands/simply/permissions/analyze.js)_
112
+ _See code: [lib/commands/simply/permissions/assignment/delete.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-permissions@1.3.6/packages/simply-permissions/lib/commands/simply/permissions/assignment/delete.js)_
184
113
 
185
114
  ## `sf simply permissions build`
186
115
 
@@ -247,7 +176,7 @@ FLAG DESCRIPTIONS
247
176
  'view-all' additionally grants view-all-records, and 'modify-all' grants full CRUD and modify-all-records access.
248
177
  ```
249
178
 
250
- _See code: [lib/commands/simply/permissions/build.js](https://github.com/SimplySF/simply-node/blob/@simplysf/simply-permissions@1.2.13/packages/simply-permissions/lib/commands/simply/permissions/build.js)_
179
+ _See code: [lib/commands/simply/permissions/build.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-permissions@1.3.6/packages/simply-permissions/lib/commands/simply/permissions/build.js)_
251
180
  <!-- commandsstop -->
252
181
 
253
182
  ## Configuration Files
@@ -288,4 +217,4 @@ The `--config` flag on `sf simply permissions build` takes the path to a JSON fi
288
217
 
289
218
  ## License
290
219
 
291
- Licensed under the [Apache-2.0](https://raw.githubusercontent.com/SimplySF/simply-node/main/LICENSE.txt) license.
220
+ Licensed under the [Apache-2.0](https://raw.githubusercontent.com/SimplySF/simply-plugins/main/LICENSE.txt) license.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simplysf/simply-permissions",
3
3
  "description": "Utilities for working with permissions",
4
- "version": "1.3.6",
4
+ "version": "1.3.7",
5
5
  "author": "@ClayChipps",
6
6
  "homepage": "https://github.com/SimplySF/simply-plugins",
7
7
  "bugs": "https://github.com/SimplySF/simply-plugins/issues",
@@ -63,7 +63,7 @@
63
63
  "@salesforce/source-deploy-retrieve": "^12.37.2",
64
64
  "@simplysf/simply-core": "^1.5.1",
65
65
  "@simplysf/simply-permissions-core": "^0.2.2",
66
- "@simplysf/simply-plugin-kit": "^1.0.6",
66
+ "@simplysf/simply-plugin-kit": "^1.0.7",
67
67
  "zod": "^4.1.12"
68
68
  },
69
69
  "devDependencies": {
@@ -199,5 +199,5 @@
199
199
  "output": []
200
200
  }
201
201
  },
202
- "gitHead": "5d080040580b7fd546ced9a4f8f687b725578daa"
202
+ "gitHead": "a836763b64db560efdb2a62784d5115f3e7b5509"
203
203
  }