permissionset

package
v0.35.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApexCmd = &cobra.Command{
	Use:   "apex",
	Short: "Manage apex class visibility",
}
View Source
var ApplicationCmd = &cobra.Command{
	Use:   "application",
	Short: "Manage application visibility",
}
View Source
var CustomMetadataTypesCmd = &cobra.Command{
	Use:   "custom-metadata",
	Short: "Manage custom metadata types",
}
View Source
var CustomPermissionsCmd = &cobra.Command{
	Use:   "custom-permissions",
	Short: "Manage custom permissions",
}
View Source
var EditCmd = &cobra.Command{
	Use:   "edit [flags] [filename]...",
	Short: "Edit permission set",
	Args:  cobra.MinimumNArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		for _, file := range args {
			updatePermissionSet(file)
		}
	},
}
View Source
var FieldPermissionsCmd = &cobra.Command{
	Use:   "field-permissions",
	Short: "Manage field permissions",
}
View Source
var MergeCmd = &cobra.Command{
	Use:                   "merge -s path/to/Source.permissionset [filename]...",
	Short:                 "Merge permissions",
	Long:                  "Apply permissions granted in source permission set or profile",
	Args:                  cobra.MinimumNArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		grant, err := permissionGranter.Open(sourceFileName)
		if err != nil {
			log.Fatal("loading source permissions failed: " + err.Error())
		}
		for _, file := range args {
			mergePermissions(file, grant)
		}
	},
}
View Source
var NewCmd = &cobra.Command{
	Use:   "new [flags] [filename]...",
	Short: "Create new permission set",
	Args:  cobra.MinimumNArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		for _, file := range args {
			addPermissionSet(file)
		}
	},
}
View Source
var ObjectPermissionsCmd = &cobra.Command{
	Use:   "object-permissions",
	Short: "Update object permissions",
}
View Source
var RecordTypeCmd = &cobra.Command{
	Use:   "recordtype",
	Short: "Manage record type visibility",
}
View Source
var TabCmd = &cobra.Command{
	Use:   "tab",
	Short: "Manage tab visibility",
}
View Source
var TidyCmd = &cobra.Command{
	Use:   "tidy [flags] [filename]...",
	Short: "Tidy Permission Set metadata",
	Long: `
Tidy permission set metadata.

	The --wide and --ignore-errors flags can be used to help manage
	Permission Set metadata stored in a git repository.

	Configure clean and smudge git filters to use force-md:
	$ git config --local filter.salesforce-permissionset.clean 'force-md permissionset tidy --wide --ignore-errors -'
	$ git config --local filter.salesforce-permissionset.smudge 'force-md permissionset tidy --ignore-errors -'

	Update .gitattributes to use the salesforce-permissionset filter:
	*.permissionset-meta.xml filter=salesforce-permissionset

	The --wide flag will cause the Permission Set metadata to be stored in a
	flattened format that makes it easier to resolve merge conflicts.  If a child
	of a fieldPermissions element changes, for example, the entire
	fieldPermissions element will show up as changed because it's stored on a single line.

	The smudge filter will cause the metadata to be unflattened so it's available
	in the normal "long" format in the working copy.

`,
	Args: cobra.MinimumNArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		for _, file := range args {
			list, _ := cmd.Flags().GetBool("list")
			if list {
				checkIfChanged(file)
			} else {
				tidy(file)
			}
		}
	},
}
View Source
var UserPermissionsCmd = &cobra.Command{
	Use:   "user-permissions",
	Short: "Manage user permissions",
}
View Source
var VisualforceCmd = &cobra.Command{
	Use:   "visualforce",
	Short: "Manage visualforce page visibility",
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL