profile

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: 16 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 CustomPermissionsCmd = &cobra.Command{
	Use:   "custom-permissions",
	Short: "Manage custom permissions",
}
View Source
var FieldPermissionsCmd = &cobra.Command{
	Use:   "field-permissions",
	Short: "Manage field permissions",
}
View Source
var FlowCmd = &cobra.Command{
	Use:   "flow",
	Short: "Manage flow visibility",
}
View Source
var LayoutCmd = &cobra.Command{
	Use:   "layout",
	Short: "Manage page layouts",
}
View Source
var LoginFlowCmd = &cobra.Command{
	Use:   "loginflow",
	Short: "Manage login flow",
}
View Source
var MergeCmd = &cobra.Command{
	Use:                   "merge -s path/to/Source.profile [filename]...",
	Short:                 "Merge profiles",
	Long:                  "Apply permissions granted in source profile",
	Args:                  cobra.MinimumNArgs(1),
	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		apply, err := profile.Open(sourceFileName)
		if err != nil {
			log.Fatal("loading source profile failed: " + err.Error())
		}
		for _, file := range args {
			mergePermissions(file, *apply)
		}
	},
}
View Source
var NewCmd = &cobra.Command{
	Use:   "new [flags] [filename]...",
	Short: "Create new profile",
	Args:  cobra.MinimumNArgs(1),
	Run: func(cmd *cobra.Command, args []string) {
		for _, file := range args {
			addProfile(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 TabVisibilityIds = map[TabVisibility][]string{
	DefaultOn:  {"DefaultOn"},
	DefaultOff: {"DefaultOff"},
	Hidden:     {"Hidden"},
}
View Source
var TidyCmd = &cobra.Command{
	Use:   "tidy [flags] [filename]...",
	Short: "Tidy profile metadata",
	Long: `
Tidy profile metadata.

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

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

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

	The --wide flag will cause the Profile 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

type TabVisibility

type TabVisibility enumflag.Flag
const (
	DefaultOn TabVisibility = iota
	DefaultOff
	Hidden
)

Jump to

Keyboard shortcuts

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