Skip to content

Commit

Permalink
Minlopro: Lightning Knowledge Setup WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomeandrey committed Dec 13, 2024
1 parent 80f9b4d commit 36dde28
Show file tree
Hide file tree
Showing 8 changed files with 163 additions and 3 deletions.
8 changes: 6 additions & 2 deletions scripts/deploy/post/apex/1_set_up_qa_user.apex
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ if (foundProfiles.isEmpty()) {
User qaUser = foundUsers[0];
Profile minloproProfile = foundProfiles.get(0);

// Switch to custom profile;
update new User(Id = qaUser.Id, ProfileId = minloproProfile.Id);
// Switch to custom profile + update QA user details;
update new User(
Id = qaUser.Id,
ProfileId = minloproProfile.Id,
UserPermissionsKnowledgeUser = true
);

// Assign PSG intended for internal users;
PermissionSetService service = PermissionSetService.getInstance();
Expand Down
3 changes: 2 additions & 1 deletion scripts/deploy/post/apex/2_set_up_org_admin.apex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ update new User(
Country = 'United States',
UserPermissionsKnowledgeUser = true,
ExternalId__c = UserInfo.getUserName(),
UserPreferencesHasSentWarningEmail = true
UserPreferencesHasSentWarningEmail = true,
UserPermissionsKnowledgeUser = true
);
User runningUser = [
SELECT
Expand Down
4 changes: 4 additions & 0 deletions src/minlopro/main/applications/MinloproConsole.app-meta.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<tabs>GoogleMapsApiPlayground</tabs>
<tabs>Car__c</tabs>
<tabs>standard-report</tabs>
<tabs>Knowledge__kav</tabs>
<uiType>Lightning</uiType>
<utilityBar>MinloproConsole_UtilityBar</utilityBar>
<workspaceConfig>
Expand All @@ -83,6 +84,9 @@
<mappings>
<tab>GoogleMapsApiPlayground</tab>
</mappings>
<mappings>
<tab>Knowledge__kav</tab>
</mappings>
<mappings>
<tab>LogsMonitor</tab>
</mappings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<hasActivationRequired>false</hasActivationRequired>
<label>Minlopro - PSG - Admin</label>
<permissionSets>Minlopro_Admin</permissionSets>
<permissionSets>Minlopro_KnowledgeAdmin</permissionSets>
<permissionSets>SH2__Storage_Helper</permissionSets>
<permissionSets>dlrs__LookupRollupSummariesFull</permissionSets>
<permissionSets>dlrs__LookupRollupSummariesReadOnly</permissionSets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<permissionSets>Minlopro_ForceComSite</permissionSets>
<permissionSets>Minlopro_GithubWebhook</permissionSets>
<permissionSets>Minlopro_GoogleMaps</permissionSets>
<permissionSets>Minlopro_KnowledgeUser</permissionSets>
<permissionSets>Minlopro_LeadsManager</permissionSets>
<permissionSets>Minlopro_Logger</permissionSets>
<permissionSets>Minlopro_SalesforceConnectCustomAdapter</permissionSets>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
<description>Grants admin access to create, edit, archive, and delete Knowledge articles.</description>
<hasActivationRequired>false</hasActivationRequired>
<label>Minlopro - Knowledge Admin</label>
<objectPermissions>
<allowCreate>true</allowCreate>
<allowDelete>true</allowDelete>
<allowEdit>true</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>true</modifyAllRecords>
<object>Knowledge__kav</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<tabSettings>
<tab>Knowledge__kav</tab>
<visibility>Visible</visibility>
</tabSettings>
<tabSettings>
<tab>standard-Knowledge</tab>
<visibility>Visible</visibility>
</tabSettings>
<userPermissions>
<enabled>true</enabled>
<name>AllowUniversalSearch</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>AllowViewKnowledge</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>ArchiveArticles</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>EditKnowledge</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>EditTranslation</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>ManageKnowledge</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>ManageKnowledgeImportExport</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>PublishArticles</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>PublishTranslation</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>ShareInternalArticles</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>SubmitForTranslation</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>ViewArchivedArticles</name>
</userPermissions>
<userPermissions>
<enabled>true</enabled>
<name>ViewDraftArticles</name>
</userPermissions>
</PermissionSet>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<PermissionSet xmlns="http://soap.sforce.com/2006/04/metadata">
<hasActivationRequired>false</hasActivationRequired>
<label>Minlopro - Knowledge User</label>
<objectPermissions>
<allowCreate>false</allowCreate>
<allowDelete>false</allowDelete>
<allowEdit>false</allowEdit>
<allowRead>true</allowRead>
<modifyAllRecords>false</modifyAllRecords>
<object>Knowledge__kav</object>
<viewAllRecords>true</viewAllRecords>
</objectPermissions>
<tabSettings>
<tab>Knowledge__kav</tab>
<visibility>Visible</visibility>
</tabSettings>
<tabSettings>
<tab>standard-Knowledge</tab>
<visibility>Visible</visibility>
</tabSettings>
<userPermissions>
<enabled>true</enabled>
<name>AllowViewKnowledge</name>
</userPermissions>
</PermissionSet>
48 changes: 48 additions & 0 deletions src/minlopro/main/settings/Knowledge.settings-meta.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<KnowledgeSettings xmlns="http://soap.sforce.com/2006/04/metadata">
<answers>
<enableArticleCreation>false</enableArticleCreation>
</answers>
<cases>
<articlePublicSharingCommunities>
<community>DigEx</community>
</articlePublicSharingCommunities>
<enableArticleCreation>false</enableArticleCreation>
<enableArticlePublicSharingSites>true</enableArticlePublicSharingSites>
<enableCaseDataCategoryMapping>true</enableCaseDataCategoryMapping>
<useProfileForPDFCreation>false</useProfileForPDFCreation>
</cases>
<defaultLanguage>en_US</defaultLanguage>
<enableChatterQuestionKBDeflection>false</enableChatterQuestionKBDeflection>
<enableCreateEditOnArticlesTab>true</enableCreateEditOnArticlesTab>
<enableExternalMediaContent>true</enableExternalMediaContent>
<enableKbStandardSharing>false</enableKbStandardSharing>
<enableKnowledge>true</enableKnowledge>
<enableKnowledgeAgentContribution>false</enableKnowledgeAgentContribution>
<enableKnowledgeAnswersPromotion>false</enableKnowledgeAnswersPromotion>
<enableKnowledgeArticleTextHighlights>true</enableKnowledgeArticleTextHighlights>
<enableKnowledgeCaseRL>false</enableKnowledgeCaseRL>
<enableKnowledgeKeywordAutoComplete>true</enableKnowledgeKeywordAutoComplete>
<enableKnowledgeTitleAutoComplete>true</enableKnowledgeTitleAutoComplete>
<enableLightningKbAutoLoadRichTextField>false</enableLightningKbAutoLoadRichTextField>
<enableLightningKnowledge>true</enableLightningKnowledge>
<showArticleSummariesCustomerPortal>false</showArticleSummariesCustomerPortal>
<showArticleSummariesInternalApp>false</showArticleSummariesInternalApp>
<showArticleSummariesPartnerPortal>false</showArticleSummariesPartnerPortal>
<showValidationStatusField>false</showValidationStatusField>
<suggestedArticles>
<caseFields>
<field>
<name>Subject</name>
</field>
</caseFields>
<useSuggestedArticlesForCase>false</useSuggestedArticlesForCase>
<workOrderFields>
<field>
<name>Subject</name>
</field>
</workOrderFields>
<workOrderLineItemFields>
<field>
<name>Subject</name>
</field>
</workOrderLineItemFields>
</suggestedArticles>
<votingEnabled>true</votingEnabled>
</KnowledgeSettings>

0 comments on commit 36dde28

Please sign in to comment.