diff --git a/lib/describe-metadata-service.js b/lib/describe-metadata-service.js index 181e8380..9cf50da2 100755 --- a/lib/describe-metadata-service.js +++ b/lib/describe-metadata-service.js @@ -4,11 +4,6 @@ var _ = require('underscore'); var path = require('path'); var childTypes = [{ - xmlName: 'ActionOverride', - tagName: 'actionOverrides', - parent: 'CustomObject', - key: 'actionName' -}, { xmlName: 'AssignmentRule', tagName: 'assignmentRule', parent: 'AssignmentRules', @@ -20,6 +15,23 @@ var childTypes = [{ parent: 'AutoResponseRules', key: 'fullName', isNamed: true +}, { + xmlName: 'ActionOverride', + tagName: 'actionOverrides', + parent: 'CustomObject', + key: 'actionName' +}, { + xmlName: 'BusinessProcess', + tagName: 'businessProcesses', + parent: 'CustomObject', + key: 'fullName', + isNamed: true +}, { + xmlName: 'CompactLayout', + tagName: 'compactLayouts', + parent: 'CustomObject', + key: 'fullName', + isNamed: true }, { xmlName: 'CustomField', tagName: 'fields', @@ -27,20 +39,20 @@ var childTypes = [{ key: 'fullName', isNamed: true }, { - xmlName: 'Index', - tagName: 'indexes', + xmlName: 'FieldSet', + tagName: 'fieldSets', parent: 'CustomObject', key: 'fullName', isNamed: true }, { - xmlName: 'BusinessProcess', - tagName: 'businessProcesses', + xmlName: 'Index', + tagName: 'indexes', parent: 'CustomObject', key: 'fullName', isNamed: true }, { - xmlName: 'CompactLayout', - tagName: 'compactLayouts', + xmlName: 'ListView', + tagName: 'listViews', parent: 'CustomObject', key: 'fullName', isNamed: true @@ -51,11 +63,16 @@ var childTypes = [{ key: 'fullName', isNamed: true }, { - xmlName: 'WebLink', - tagName: 'webLinks', + xmlName: 'SharingReason', + tagName: 'sharingReasons', parent: 'CustomObject', key: 'fullName', isNamed: true +}, { + xmlName: 'SharingRecalculation', + tagName: 'sharingRecalculations', + parent: 'CustomObject', + key: 'className' }, { xmlName: 'ValidationRule', tagName: 'validationRules', @@ -63,8 +80,8 @@ var childTypes = [{ key: 'fullName', isNamed: true }, { - xmlName: 'SharingReason', - tagName: 'sharingReasons', + xmlName: 'WebLink', + tagName: 'webLinks', parent: 'CustomObject', key: 'fullName', isNamed: true @@ -80,18 +97,6 @@ var childTypes = [{ parent: 'SharingRules', key: 'fullName', isNamed: true -}, { - xmlName: 'ListView', - tagName: 'listViews', - parent: 'CustomObject', - key: 'fullName', - isNamed: true -}, { - xmlName: 'FieldSet', - tagName: 'fieldSets', - parent: 'CustomObject', - key: 'fullName', - isNamed: true }, { xmlName: 'WorkflowFieldUpdate', tagName: 'fieldUpdates', @@ -158,21 +163,31 @@ var childTypes = [{ tagName: 'applicationVisibilities', parent: 'Profile', key: 'application' +}, { + xmlName: 'ProfileCategoryGroupVisibility', + tagName: 'categoryGroupVisibilities', + parent: 'Profile', + key: 'dataCategoryGroup' }, { xmlName: 'ProfileApexClassAccess', tagName: 'classAccesses', parent: 'Profile', key: 'apexClass' }, { - xmlName: 'ProfileApexPageAccess', - tagName: 'pageAccesses', + xmlName: 'ProfileCustomMetadataTypeAccess', + tagName: 'customMetadataTypeAccesses', parent: 'Profile', - key: 'apexPage' + key: 'name' }, { xmlName: 'ProfileCustomPermissions', tagName: 'customPermissions', parent: 'Profile', key: 'name' +}, { + xmlName: 'ProfileCustomSettingAccesses', + tagName: 'customSettingAccesses', + parent: 'Profile', + key: 'name' }, { xmlName: 'ProfileExternalDataSourceAccess', tagName: 'externalDataSourceAccesses', @@ -194,6 +209,16 @@ var childTypes = [{ tagName: 'objectPermissions', parent: 'Profile', key: 'object' +}, { + xmlName: 'ProfileApexPageAccess', + tagName: 'pageAccesses', + parent: 'Profile', + key: 'apexPage' +}, { + xmlName: 'ProfileActionOverride', + tagName: 'profileActionOverrides', + parent: 'Profile', + key: 'actionName' }, { xmlName: 'ProfileRecordTypeVisibility', tagName: 'recordTypeVisibilities', diff --git a/test-functional/data/simple-metadata/profile-custom-settings/expected/package.xml b/test-functional/data/simple-metadata/profile-custom-settings/expected/package.xml new file mode 100644 index 00000000..867e4b2f --- /dev/null +++ b/test-functional/data/simple-metadata/profile-custom-settings/expected/package.xml @@ -0,0 +1,8 @@ + + + + Admin + Profile + + 48.0 + diff --git a/test-functional/data/simple-metadata/profile-custom-settings/expected/profiles/Admin.profile b/test-functional/data/simple-metadata/profile-custom-settings/expected/profiles/Admin.profile new file mode 100644 index 00000000..15761b48 --- /dev/null +++ b/test-functional/data/simple-metadata/profile-custom-settings/expected/profiles/Admin.profile @@ -0,0 +1,7 @@ + + + + true + MyCustomSetting__c + + diff --git a/test-functional/data/simple-metadata/profile-custom-settings/v0/objects/MyCustomSetting__c.object b/test-functional/data/simple-metadata/profile-custom-settings/v0/objects/MyCustomSetting__c.object new file mode 100644 index 00000000..b5f0c4a5 --- /dev/null +++ b/test-functional/data/simple-metadata/profile-custom-settings/v0/objects/MyCustomSetting__c.object @@ -0,0 +1,7 @@ + + + Hierarchy + false + + Public + diff --git a/test-functional/data/simple-metadata/profile-custom-settings/v0/package.xml b/test-functional/data/simple-metadata/profile-custom-settings/v0/package.xml new file mode 100644 index 00000000..d4d19469 --- /dev/null +++ b/test-functional/data/simple-metadata/profile-custom-settings/v0/package.xml @@ -0,0 +1,12 @@ + + + + MyCustomSetting__c + CustomObject + + + Admin + Profile + + 48.0 + diff --git a/test-functional/data/simple-metadata/profile-custom-settings/v0/profiles/Admin.profile b/test-functional/data/simple-metadata/profile-custom-settings/v0/profiles/Admin.profile new file mode 100644 index 00000000..8128ac94 --- /dev/null +++ b/test-functional/data/simple-metadata/profile-custom-settings/v0/profiles/Admin.profile @@ -0,0 +1,665 @@ + + + false + Salesforce + + true + ActivateContract + + + true + ActivateOrder + + + true + ActivitiesAccess + + + true + AddDirectMessageMembers + + + true + AllowUniversalSearch + + + true + AllowViewKnowledge + + + true + ApexRestServices + + + true + ApiEnabled + + + true + AssignPermissionSets + + + true + AssignTopics + + + true + AuthorApex + + + true + BulkMacrosAllowed + + + true + CanInsertFeedSystemFields + + + true + CanUseNewDashboardBuilder + + + true + CanVerifyComment + + + true + ChangeDashboardColors + + + true + ChatterEditOwnPost + + + true + ChatterEditOwnRecordPost + + + true + ChatterFileLink + + + true + ChatterInternalUser + + + true + ChatterInviteExternalUsers + + + true + ChatterOwnGroups + + + true + ConnectOrgToEnvironmentHub + + + true + ConsentApiUpdate + + + true + ContentAdministrator + + + true + ContentWorkspaces + + + true + ConvertLeads + + + true + CreateCustomizeDashboards + + + true + CreateCustomizeFilters + + + true + CreateCustomizeReports + + + true + CreateDashboardFolders + + + true + CreateLtngTempFolder + + + true + CreateReportFolders + + + true + CreateTopics + + + true + CreateWorkBadgeDefinition + + + true + CreateWorkspaces + + + true + CustomizeApplication + + + true + DataExport + + + true + DelegatedTwoFactor + + + true + DeleteActivatedContract + + + true + DeleteTopics + + + true + DistributeFromPersWksp + + + true + EditActivatedOrders + + + true + EditBrandTemplates + + + true + EditCaseComments + + + true + EditEvent + + + true + EditHtmlTemplates + + + true + EditKnowledge + + + true + EditMyDashboards + + + true + EditMyReports + + + true + EditOppLineItemUnitPrice + + + true + EditPublicDocuments + + + true + EditPublicFilters + + + true + EditPublicTemplates + + + true + EditReadonlyFields + + + true + EditTask + + + true + EditTopics + + + true + EmailMass + + + true + EmailSingle + + + true + EnableCommunityAppLauncher + + + true + EnableNotifications + + + true + ExportReport + + + true + FieldServiceAccess + + + true + GiveRecognitionBadge + + + true + ImportCustomObjects + + + true + ImportLeads + + + true + ImportPersonal + + + true + InstallPackaging + + + true + LightningConsoleAllowedForUser + + + true + LightningExperienceUser + + + true + ListEmailSend + + + true + ManageAnalyticSnapshots + + + true + ManageAuthProviders + + + true + ManageBusinessHourHolidays + + + true + ManageCMS + + + true + ManageCallCenters + + + true + ManageCases + + + true + ManageCategories + + + true + ManageCertificates + + + true + ManageContentPermissions + + + true + ManageContentProperties + + + true + ManageContentTypes + + + true + ManageCustomPermissions + + + true + ManageCustomReportTypes + + + true + ManageDashbdsInPubFolders + + + true + ManageDataCategories + + + true + ManageDataIntegrations + + + true + ManageDynamicDashboards + + + true + ManageEmailClientConfig + + + true + ManageExchangeConfig + + + true + ManageHealthCheck + + + true + ManageHubConnections + + + true + ManageInteraction + + + true + ManageInternalUsers + + + true + ManageIpAddresses + + + true + ManageKnowledge + + + true + ManageKnowledgeImportExport + + + true + ManageLeads + + + true + ManageLoginAccessPolicies + + + true + ManageMobile + + + true + ManageNetworks + + + true + ManagePackageLicenses + + + true + ManagePasswordPolicies + + + true + ManageProfilesPermissionsets + + + true + ManagePropositions + + + true + ManagePvtRptsAndDashbds + + + true + ManageRecommendationStrategies + + + true + ManageRemoteAccess + + + true + ManageReportsInPubFolders + + + true + ManageRoles + + + true + ManageSearchPromotionRules + + + true + ManageSharing + + + true + ManageSolutions + + + true + ManageSubscriptions + + + true + ManageSynonyms + + + true + ManageUnlistedGroups + + + true + ManageUsers + + + true + MassInlineEdit + + + true + MergeTopics + + + true + ModerateChatter + + + true + ModifyAllData + + + true + ModifyDataClassification + + + true + ModifyMetadata + + + true + NewReportBuilder + + + true + Packaging2 + + + true + PrivacyDataAccess + + + true + RemoveDirectMessageMembers + + + true + ResetPasswords + + + true + RunReports + + + true + ScheduleReports + + + true + SelectFilesFromSalesforce + + + true + SendExternalEmailAvailable + + + true + SendSitRequests + + + true + ShareInternalArticles + + + true + ShowCompanyNameAsUserBadge + + + true + SolutionImport + + + true + SubmitMacrosAllowed + + + true + SubscribeDashboardRolesGrps + + + true + SubscribeDashboardToOtherUsers + + + true + SubscribeReportRolesGrps + + + true + SubscribeReportToOtherUsers + + + true + SubscribeReportsRunAsUser + + + true + SubscribeToLightningDashboards + + + true + SubscribeToLightningReports + + + true + TransactionalEmailSend + + + true + TransferAnyCase + + + true + TransferAnyEntity + + + true + TransferAnyLead + + + true + UseTeamReassignWizards + + + true + UseWebLink + + + true + ViewAllData + + + true + ViewAllUsers + + + true + ViewDataAssessment + + + true + ViewDataCategories + + + true + ViewDataLeakageEvents + + + true + ViewEventLogFiles + + + true + ViewFlowUsageAndFlowEventData + + + true + ViewHealthCheck + + + true + ViewHelpLink + + + true + ViewMyTeamsDashboards + + + true + ViewPublicDashboards + + + true + ViewPublicReports + + + true + ViewRoles + + + true + ViewSetup + + + true + WorkCalibrationUser + + diff --git a/test-functional/data/simple-metadata/profile-custom-settings/v1/objects/MyCustomSetting__c.object b/test-functional/data/simple-metadata/profile-custom-settings/v1/objects/MyCustomSetting__c.object new file mode 100644 index 00000000..b5f0c4a5 --- /dev/null +++ b/test-functional/data/simple-metadata/profile-custom-settings/v1/objects/MyCustomSetting__c.object @@ -0,0 +1,7 @@ + + + Hierarchy + false + + Public + diff --git a/test-functional/data/simple-metadata/profile-custom-settings/v1/package.xml b/test-functional/data/simple-metadata/profile-custom-settings/v1/package.xml new file mode 100644 index 00000000..d4d19469 --- /dev/null +++ b/test-functional/data/simple-metadata/profile-custom-settings/v1/package.xml @@ -0,0 +1,12 @@ + + + + MyCustomSetting__c + CustomObject + + + Admin + Profile + + 48.0 + diff --git a/test-functional/data/simple-metadata/profile-custom-settings/v1/profiles/Admin.profile b/test-functional/data/simple-metadata/profile-custom-settings/v1/profiles/Admin.profile new file mode 100644 index 00000000..8777cd5a --- /dev/null +++ b/test-functional/data/simple-metadata/profile-custom-settings/v1/profiles/Admin.profile @@ -0,0 +1,669 @@ + + + false + + true + MyCustomSetting__c + + Salesforce + + true + ActivateContract + + + true + ActivateOrder + + + true + ActivitiesAccess + + + true + AddDirectMessageMembers + + + true + AllowUniversalSearch + + + true + AllowViewKnowledge + + + true + ApexRestServices + + + true + ApiEnabled + + + true + AssignPermissionSets + + + true + AssignTopics + + + true + AuthorApex + + + true + BulkMacrosAllowed + + + true + CanInsertFeedSystemFields + + + true + CanUseNewDashboardBuilder + + + true + CanVerifyComment + + + true + ChangeDashboardColors + + + true + ChatterEditOwnPost + + + true + ChatterEditOwnRecordPost + + + true + ChatterFileLink + + + true + ChatterInternalUser + + + true + ChatterInviteExternalUsers + + + true + ChatterOwnGroups + + + true + ConnectOrgToEnvironmentHub + + + true + ConsentApiUpdate + + + true + ContentAdministrator + + + true + ContentWorkspaces + + + true + ConvertLeads + + + true + CreateCustomizeDashboards + + + true + CreateCustomizeFilters + + + true + CreateCustomizeReports + + + true + CreateDashboardFolders + + + true + CreateLtngTempFolder + + + true + CreateReportFolders + + + true + CreateTopics + + + true + CreateWorkBadgeDefinition + + + true + CreateWorkspaces + + + true + CustomizeApplication + + + true + DataExport + + + true + DelegatedTwoFactor + + + true + DeleteActivatedContract + + + true + DeleteTopics + + + true + DistributeFromPersWksp + + + true + EditActivatedOrders + + + true + EditBrandTemplates + + + true + EditCaseComments + + + true + EditEvent + + + true + EditHtmlTemplates + + + true + EditKnowledge + + + true + EditMyDashboards + + + true + EditMyReports + + + true + EditOppLineItemUnitPrice + + + true + EditPublicDocuments + + + true + EditPublicFilters + + + true + EditPublicTemplates + + + true + EditReadonlyFields + + + true + EditTask + + + true + EditTopics + + + true + EmailMass + + + true + EmailSingle + + + true + EnableCommunityAppLauncher + + + true + EnableNotifications + + + true + ExportReport + + + true + FieldServiceAccess + + + true + GiveRecognitionBadge + + + true + ImportCustomObjects + + + true + ImportLeads + + + true + ImportPersonal + + + true + InstallPackaging + + + true + LightningConsoleAllowedForUser + + + true + LightningExperienceUser + + + true + ListEmailSend + + + true + ManageAnalyticSnapshots + + + true + ManageAuthProviders + + + true + ManageBusinessHourHolidays + + + true + ManageCMS + + + true + ManageCallCenters + + + true + ManageCases + + + true + ManageCategories + + + true + ManageCertificates + + + true + ManageContentPermissions + + + true + ManageContentProperties + + + true + ManageContentTypes + + + true + ManageCustomPermissions + + + true + ManageCustomReportTypes + + + true + ManageDashbdsInPubFolders + + + true + ManageDataCategories + + + true + ManageDataIntegrations + + + true + ManageDynamicDashboards + + + true + ManageEmailClientConfig + + + true + ManageExchangeConfig + + + true + ManageHealthCheck + + + true + ManageHubConnections + + + true + ManageInteraction + + + true + ManageInternalUsers + + + true + ManageIpAddresses + + + true + ManageKnowledge + + + true + ManageKnowledgeImportExport + + + true + ManageLeads + + + true + ManageLoginAccessPolicies + + + true + ManageMobile + + + true + ManageNetworks + + + true + ManagePackageLicenses + + + true + ManagePasswordPolicies + + + true + ManageProfilesPermissionsets + + + true + ManagePropositions + + + true + ManagePvtRptsAndDashbds + + + true + ManageRecommendationStrategies + + + true + ManageRemoteAccess + + + true + ManageReportsInPubFolders + + + true + ManageRoles + + + true + ManageSearchPromotionRules + + + true + ManageSharing + + + true + ManageSolutions + + + true + ManageSubscriptions + + + true + ManageSynonyms + + + true + ManageUnlistedGroups + + + true + ManageUsers + + + true + MassInlineEdit + + + true + MergeTopics + + + true + ModerateChatter + + + true + ModifyAllData + + + true + ModifyDataClassification + + + true + ModifyMetadata + + + true + NewReportBuilder + + + true + Packaging2 + + + true + PrivacyDataAccess + + + true + RemoveDirectMessageMembers + + + true + ResetPasswords + + + true + RunReports + + + true + ScheduleReports + + + true + SelectFilesFromSalesforce + + + true + SendExternalEmailAvailable + + + true + SendSitRequests + + + true + ShareInternalArticles + + + true + ShowCompanyNameAsUserBadge + + + true + SolutionImport + + + true + SubmitMacrosAllowed + + + true + SubscribeDashboardRolesGrps + + + true + SubscribeDashboardToOtherUsers + + + true + SubscribeReportRolesGrps + + + true + SubscribeReportToOtherUsers + + + true + SubscribeReportsRunAsUser + + + true + SubscribeToLightningDashboards + + + true + SubscribeToLightningReports + + + true + TransactionalEmailSend + + + true + TransferAnyCase + + + true + TransferAnyEntity + + + true + TransferAnyLead + + + true + UseTeamReassignWizards + + + true + UseWebLink + + + true + ViewAllData + + + true + ViewAllUsers + + + true + ViewDataAssessment + + + true + ViewDataCategories + + + true + ViewDataLeakageEvents + + + true + ViewEventLogFiles + + + true + ViewFlowUsageAndFlowEventData + + + true + ViewHealthCheck + + + true + ViewHelpLink + + + true + ViewMyTeamsDashboards + + + true + ViewPublicDashboards + + + true + ViewPublicReports + + + true + ViewRoles + + + true + ViewSetup + + + true + WorkCalibrationUser + + diff --git a/test-functional/feature/changeset-simple-metadata.feature b/test-functional/feature/changeset-simple-metadata.feature index f631e34d..84940b84 100644 --- a/test-functional/feature/changeset-simple-metadata.feature +++ b/test-functional/feature/changeset-simple-metadata.feature @@ -11,6 +11,7 @@ Feature: Change Set: Handle Properties of Simple Metadata Types | PermissionSet | simple-metadata/permissionSet-changed | | PermissionSet | simple-metadata/permissionSet-added-desc | | Profile | simple-metadata/profile-layout-assignments | + | Profile | simple-metadata/profile-custom-settings | | Profile | simple-metadata/profile-description-changed | Scenario Outline: Simple metadata are added, updated and removed