Change path for acl entityrole form
authorAidan Saunders <aidan.saunders@squiffle.uk>
Mon, 24 Jul 2023 17:07:07 +0000 (18:07 +0100)
committerAidan Saunders <aidan.saunders@squiffle.uk>
Mon, 24 Jul 2023 19:27:28 +0000 (20:27 +0100)
CRM/ACL/Form/EntityRole.php
CRM/Core/xml/Menu/Misc.xml
xml/schema/ACL/ACLEntityRole.xml

index eb137544bad16ae7c6c19444db935e72e80a0b53..4e1b41be51bc865c2ec7ccb0c678b99c172d79c0 100644 (file)
@@ -24,7 +24,14 @@ class CRM_ACL_Form_EntityRole extends CRM_Admin_Form {
   public $submitOnce = TRUE;
 
   /**
-   * Build the form object.
+   * Explicitly declare the entity api name.
+   */
+  public function getDefaultEntity(): string {
+    return 'ACLEntityRole';
+  }
+
+  /**
+   * http://adminui.localhost/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Facl%2Fentityrole&reset=1&action=add Build the form object.
    */
   public function buildQuickForm() {
     parent::buildQuickForm();
index 5aad20becc9deb486f928f624d17fab44687d369..96584fc654f20746b84324e76b8564cbbd88d525 100644 (file)
      <page_callback>CRM_ACL_Page_EntityRole</page_callback>
      <access_arguments>administer CiviCRM,access CiviCRM</access_arguments>
   </item>
+  <item>
+     <path>civicrm/acl/entityrole/edit</path>
+     <title>Assign Users to ACL Roles</title>
+     <page_callback>CRM_ACL_Form_EntityRole</page_callback>
+     <access_arguments>administer CiviCRM,access CiviCRM</access_arguments>
+  </item>>
   <item>
      <path>civicrm/file</path>
      <title>Browse Uploaded files</title>
index b39c84d92d0765a446c6d595a8045b09c4f2a5fc..c0dcf4a5950c7015398a9671a52a07f3c89324df 100644 (file)
@@ -9,10 +9,10 @@
   <title>ACL Role Assignment</title>
   <titlePlural>ACL Role Assignments</titlePlural>
   <paths>
-    <add>civicrm/acl/entityrole?reset=1&amp;action=add</add>
-    <delete>civicrm/acl/entityrole?reset=1&amp;action=delete&amp;id=[id]</delete>
-    <update>civicrm/acl/entityrole?reset=1&amp;action=update&amp;id=[id]</update>
-    <browse>civicrm/acl</browse>
+    <add>civicrm/acl/entityrole/edit?reset=1&amp;action=add</add>
+    <delete>civicrm/acl/entityrole/edit?reset=1&amp;action=delete&amp;id=[id]</delete>
+    <update>civicrm/acl/entityrole/edit?reset=1&amp;action=update&amp;id=[id]</update>
+    <browse>civicrm/acl/entityrole</browse>
   </paths>
   <field>
     <name>id</name>