- First commit to issue fork.
- π³πΏNew Zealand RoSk0 Wellington
This issue is quite outdated - I can see a bunch of changes have been done in #2928452: Add "uid" entity key to contacts and fix key check in CRMCorePermissions::entityTypePermissions β back in January 2020.
I will check what test coverage we do have already for permissions and try to progress that as much as I can today/tomorrow.
Not using existing MR as it has too much unrelated changes I'm struggling to follow.
- π³πΏNew Zealand RoSk0 Wellington
Current permission test coverage:
administer individual types
-IndividualUiTest.php
administer organization types
-OrganizationUiTest.php
revert organization revisions
-view all crm_core_individual revisions
-IndividualUiTest.php
revert all crm_core_individual revisions
- ^view all crm_core_organization revisions
-OrganizationUiTest.php
administer crm_core_individual entities
-IndividualUiTest.php
create crm_core_individual entities
-IndividualUiTest.php
edit own crm_core_individual entities
-edit any crm_core_individual entity
-IndividualUiTest.php
view own crm_core_individual entities
-view any crm_core_individual entity
-IndividualUiTest.php
create crm_core_individual entities of bundle customer
-IndividualUiTest.php
edit own crm_core_individual entities of bundle customer
-edit any crm_core_individual entity of bundle customer
-IndividualEditFormTest.php
delete own crm_core_individual entities of bundle customer
-delete any crm_core_individual entity of bundle customer
-IndividualEditFormTest.php
view own crm_core_individual entities of bundle customer
-view any crm_core_individual entity of bundle customer
-IndividualEditFormTest.php
administer crm_core_organization entities
-OrganizationUiTest.php
create crm_core_organization entities
-edit own crm_core_organization entities
-edit any crm_core_organization entity
-OrganizationEditFormTest.php
view own crm_core_organization entities
-view any crm_core_organization entity
-OrganizationEditFormTest.php
,OrganizationUiTest.php
create crm_core_organization entities of bundle
- ^edit own crm_core_organization entities of bundle
-edit any crm_core_organization entity of bundle
-OrganizationEditFormTest.php
delete own crm_core_organization entities of bundle
-delete any crm_core_organization entity of bundle
-view own crm_core_organization entities of bundle
-view any crm_core_organization entity of bundle
-OrganizationEditFormTest.php
From the list above, I believe only
delete any crm_core_organization entity of bundle
permission is mandatory to be added for the base line to be solid. Adding test coverage in https://git.drupalcode.org/project/crm_core/-/merge_requests/43 .All the
own
permissions are nice to have from my point of view , but are not crucial - most use cases require more sophisticated access controls anyway. So I will leave this issue open for anyone who would like to contribute test coverage for those.