hardis:project:clean:minimizeprofiles
Description
Remove all profile attributes that exist on Permission Sets
It is a bad practice to define on Profiles elements that can be defined on Permission Sets.
Salesforce will deprecate such capability in Spring 26.
Don't wait for that, and use minimizeProfiles cleaning to automatically remove from Profiles any permission that exists on a Permission Set !
The following XML tags are removed automatically:
- classAccesses
- customMetadataTypeAccesses
- externalDataSourceAccesses
- fieldPermissions
- objectPermissions
- pageAccesses
- userPermissions (except on Admin Profile)
You can override this list by defining a property minimizeProfilesNodesToRemove in your .sfdx-hardis.yml config file.
You can also skip profiles using property skipMinimizeProfiles
Example:
skipMinimizeProfiles
- MyClient Customer Community Login User
- MyClientPortail Profile
Parameters
Name | Type | Description | Default | Required | Options |
---|---|---|---|---|---|
debug -d |
boolean | Activate debug mode (more logs) | |||
flags-dir | option | undefined | |||
folder -f |
option | Root folder | force-app | ||
json | boolean | Format output as json. | |||
skipauth | boolean | Skip authentication check when a default username is required | |||
websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration |
Examples
$ sf hardis:project:clean:minimizeprofiles