Skip to content

Commit

Permalink
Merge pull request #151 from texei/convert-profile-permset
Browse files Browse the repository at this point in the history
Added "texei profile convert" command
  • Loading branch information
FabienTaillon authored Mar 11, 2024
2 parents fa80b28 + dc4f839 commit 65b7f7e
Show file tree
Hide file tree
Showing 14 changed files with 1,191 additions and 1,110 deletions.
35 changes: 35 additions & 0 deletions messages/profile.convert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# summary

convert a Profile to a Permission Set [BETA]

# description

this command converts in the target org a Profile to a Permission Set.

It will not use Profiles stored locally in your project but it will:

- dynamically retrieve the full Profile from your target org
- convert it to a Permission Set
- deploy it to the target org

No update to local Profile or Permission Set is done, but you'll be able to manually retrieve the created/updated Permission Set

# examples

sf texei profile convert --profile-name 'My Profile'

# warning

This command is in BETA, test the converted Permission Sets, and report any issue at https://github.com/texei/texei-sfdx-plugin/issues

# flags.profile-name.summary

name of the Profile in the target org to convert to a Permission Set

# flags.override-name.summary

override Permission Set Name generated from Profile name

# flags.override-api-name.summary

override API Name generated from Profile name
8 changes: 7 additions & 1 deletion messages/skinnyprofile.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ create a profile on target org with minimum access

# description

command description
This command:

- looks at all Profiles in your target org
- looks at all custom Profiles in your project that are not in your target org
- create all custom Profiles missing in your target org as empty Profiles

The command creates Profiles one by one, so if one Profile creation fails (for instance a local Profile is using a license not available in the org), all previous Profiles will still be created in the org.

# examples

Expand Down
18 changes: 18 additions & 0 deletions messages/skinnyprofile.retrieve.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

export a skinny profile with just profile-specific metadata

# description

This command will retrieve Profiles, and keep only what can't be on a Permission Set. All other reference to metadata will be removed.
Only access to what's in your project will be listed in the Profile metadata.

The command:

- list all Profiles in local project
- look at Page Layouts, Record Types and Custom Applications in your local project
- will retrieve listed Profiles with access rights for metadata from the previous step
- will keep access for Page Layouts, default Record Types and Default custom application
- will remove everything that should be on a Permission Set(Field Level Security, Apex Classes access, Tab visibilities, etc...)
- save the Profiles locally

# examples

sf texei skinnyprofile retrieve --target-org MyScratchOrg

# flags.timeout.summary

timeout(ms) for profile retrieve (Default: 60000ms)
Loading

0 comments on commit 65b7f7e

Please sign in to comment.