@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.
- package/README.md +29 -100
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @simplysf/simply-permissions
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.com/@simplysf/simply-permissions) [](https://npmjs.com/@simplysf/simply-permissions) [](https://raw.githubusercontent.com/SimplySF/simply-
|
|
3
|
+
[](https://npmjs.com/@simplysf/simply-permissions) [](https://npmjs.com/@simplysf/simply-permissions) [](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-
|
|
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-
|
|
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-
|
|
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
|
|
71
|
+
## `sf simply permissions assignment delete`
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
Delete PermissionSetAssignments for one or more PermissionSets/PermissionSetGroups.
|
|
73
74
|
|
|
74
75
|
```
|
|
75
76
|
USAGE
|
|
76
|
-
$ sf simply permissions
|
|
77
|
-
[--
|
|
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
|
-
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
--
|
|
84
|
-
--
|
|
85
|
-
--
|
|
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
|
-
|
|
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
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
-
|
|
165
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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/
|
|
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-
|
|
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-
|
|
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.
|
|
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.
|
|
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": "
|
|
202
|
+
"gitHead": "a836763b64db560efdb2a62784d5115f3e7b5509"
|
|
203
203
|
}
|