Skip to content

Commit

Permalink
Merge pull request #1027 from bcgov/EDRD-Sprint1
Browse files Browse the repository at this point in the history
Edrd sprint1
  • Loading branch information
deepakmulamalla authored Dec 21, 2023
2 parents 15f3f12 + 772812d commit 5a3e7a6
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<SharingRules xmlns="http://soap.sforce.com/2006/04/metadata">
<sharingCriteriaRules>
<fullName>EDRD_Admin</fullName>
<accessLevel>Edit</accessLevel>
<accountSettings>
<caseAccessLevel>Edit</caseAccessLevel>
<contactAccessLevel>Edit</contactAccessLevel>
<opportunityAccessLevel>None</opportunityAccessLevel>
</accountSettings>
<label>EDRD Admin</label>
<sharedTo>
<role>EDRD_Admin</role>
</sharedTo>
<criteriaItems>
<field>RecordTypeId</field>
<operation>equals</operation>
<value>Manufacturer,Patient,Provider</value>
</criteriaItems>
<includeRecordsOwnedByAll>true</includeRecordsOwnedByAll>
</sharingCriteriaRules>
<sharingCriteriaRules>
<fullName>EDRD_Staff</fullName>
<accessLevel>Read</accessLevel>
<accountSettings>
<caseAccessLevel>Read</caseAccessLevel>
<contactAccessLevel>Read</contactAccessLevel>
<opportunityAccessLevel>None</opportunityAccessLevel>
</accountSettings>
<label>EDRD Staff</label>
<sharedTo>
<role>EDRD_Staff</role>
</sharedTo>
<criteriaItems>
<field>RecordTypeId</field>
<operation>equals</operation>
<value>Manufacturer,Patient,Provider</value>
</criteriaItems>
<includeRecordsOwnedByAll>true</includeRecordsOwnedByAll>
</sharingCriteriaRules>
<sharingOwnerRules>
<fullName>ESA_Account_ShareWithSAAdminAndInternalSubordinates</fullName>
<accessLevel>Edit</accessLevel>
Expand Down Expand Up @@ -34,24 +72,4 @@
<roleAndSubordinates>Developer</roleAndSubordinates>
</sharedFrom>
</sharingOwnerRules>
<sharingCriteriaRules>
<fullName>EDRD_Admin_and_Staff</fullName>
<accessLevel>Read</accessLevel>
<accountSettings>
<caseAccessLevel>None</caseAccessLevel>
<contactAccessLevel>Read</contactAccessLevel>
<opportunityAccessLevel>None</opportunityAccessLevel>
</accountSettings>
<description>If Account recordtype = Manufacturer/Patient/Provider, those records will be shared with users having role EDRD admins &amp; staff</description>
<label>EDRD Admin and Staff</label>
<sharedTo>
<roleAndSubordinatesInternal>EDRD_Admin</roleAndSubordinatesInternal>
</sharedTo>
<criteriaItems>
<field>RecordTypeId</field>
<operation>equals</operation>
<value>Manufacturer,Patient,Provider</value>
</criteriaItems>
<includeRecordsOwnedByAll>true</includeRecordsOwnedByAll>
</sharingCriteriaRules>
</SharingRules>
30 changes: 22 additions & 8 deletions dev-app-post/main/default/sharingRules/Case.sharingRules-meta.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<SharingRules xmlns="http://soap.sforce.com/2006/04/metadata">
<sharingCriteriaRules>
<fullName>ESA_Case_ShareWithSAAdminAndSubordinates</fullName>
<fullName>EDRD_Admin</fullName>
<accessLevel>Edit</accessLevel>
<description>This Sharing Rule expand the access (Read/Write) of case records to lower role hierarchy of SA Admin.</description>
<label>ESA_Case_ShareWithSAAdminAndSubordinates</label>
<label>EDRD Admin</label>
<sharedTo>
<roleAndSubordinatesInternal>SA_Admin</roleAndSubordinatesInternal>
<role>EDRD_Admin</role>
</sharedTo>
<criteriaItems>
<field>RecordTypeId</field>
<operation>equals</operation>
<value>Special Authority Request</value>
<value>EDRD</value>
</criteriaItems>
<includeRecordsOwnedByAll>true</includeRecordsOwnedByAll>
</sharingCriteriaRules>
<sharingCriteriaRules>
<fullName>EDRD_Admin_and_Staff</fullName>
<fullName>EDRD_Staff</fullName>
<accessLevel>Read</accessLevel>
<label>EDRD Admin and Staff</label>
<label>EDRD Staff</label>
<sharedTo>
<roleAndSubordinatesInternal>EDRD_Admin</roleAndSubordinatesInternal>
<role>EDRD_Staff</role>
</sharedTo>
<criteriaItems>
<field>RecordTypeId</field>
Expand All @@ -29,4 +28,19 @@
</criteriaItems>
<includeRecordsOwnedByAll>true</includeRecordsOwnedByAll>
</sharingCriteriaRules>
<sharingCriteriaRules>
<fullName>ESA_Case_ShareWithSAAdminAndSubordinates</fullName>
<accessLevel>Edit</accessLevel>
<description>This Sharing Rule expand the access (Read/Write) of case records to lower role hierarchy of SA Admin.</description>
<label>ESA_Case_ShareWithSAAdminAndSubordinates</label>
<sharedTo>
<roleAndSubordinatesInternal>SA_Admin</roleAndSubordinatesInternal>
</sharedTo>
<criteriaItems>
<field>RecordTypeId</field>
<operation>equals</operation>
<value>Special Authority Request</value>
</criteriaItems>
<includeRecordsOwnedByAll>true</includeRecordsOwnedByAll>
</sharingCriteriaRules>
</SharingRules>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<SharingRules xmlns="http://soap.sforce.com/2006/04/metadata">
<sharingOwnerRules>
<fullName>EDRD_Admins</fullName>
<accessLevel>Edit</accessLevel>
<label>EDRD Admins</label>
<sharedTo>
<role>EDRD_Admin</role>
</sharedTo>
<sharedFrom>
<roleAndSubordinatesInternal>EDRD_Admin</roleAndSubordinatesInternal>
</sharedFrom>
</sharingOwnerRules>
<sharingOwnerRules>
<fullName>EDRD_UOM_DeveloperShareEditWithEDRDAdmin</fullName>
<accessLevel>Edit</accessLevel>
<label>EDRD_UOM_DeveloperShareEditWithEDRDAdmin</label>
<sharedTo>
<role>EDRD_Admin</role>
</sharedTo>
<sharedFrom>
<role>Developer</role>
</sharedFrom>
</sharingOwnerRules>
</SharingRules>
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,5 @@
<lookupPhoneDialogsAdditionalFields>UnitCode</lookupPhoneDialogsAdditionalFields>
<searchResultsAdditionalFields>UnitCode</searchResultsAdditionalFields>
</searchLayouts>
<sharingModel>ReadWrite</sharingModel>
<sharingModel>Read</sharingModel>
</CustomObject>

0 comments on commit 5a3e7a6

Please sign in to comment.