Skip to content
Snippets Groups Projects
Verified Commit 19a37c38 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #2845241 by dcam, arunkumark, nitin_lama, suryakumar,...

Issue #2845241 by dcam, arunkumark, nitin_lama, suryakumar, sivaji_ganesh_jojodae, abhijith s, LG666, borisson_, nod_: If a permission's machine name is the same as its module's machine name, the Extend UI is visually broken
parent 23f9b781
Branches
Tags
1 merge request!11983Issue #3521857 by jwilson3: Update file type icons to use SVG
Pipeline #464422 passed with warnings
Pipeline: drupal

#464435

    Pipeline: drupal

    #464429

      Pipeline: drupal

      #464427

        ......@@ -188,7 +188,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
        foreach ($this->permissionsByProvider() as $provider => $permissions) {
        // Module name.
        $form['permissions'][$provider] = [
        $form['permissions']['module_' . $provider] = [
        [
        '#wrapper_attributes' => [
        'colspan' => count($role_names) + 1,
        ......
        ......@@ -4,3 +4,5 @@ a:
        title: 'Test permission'
        b:
        title: 'Test permission'
        user_permissions_test:
        title: 'Permission with the same name as the module'
        ......@@ -352,4 +352,20 @@ public function testOverriddenPermission(): void {
        $this->assertSession()->checkboxNotChecked('anonymous[access content]');
        }
        /**
        * Tests that module header rows in the permissions table have a single cell.
        */
        public function testPermissionTableHtml(): void {
        $this->drupalLogin($this->adminUser);
        \Drupal::service('module_installer')->install(['user_permissions_test']);
        $this->drupalGet('admin/people/permissions');
        // Verify that if a permission has the same name as a module, that its
        // table cells aren't combined into the module's header row. The header row
        // should have a single cell in that case.
        $header_row = $this->xpath('//tr[@data-drupal-selector=\'edit-permissions-module-user-permissions-test\'][count(td)=1]');
        $this->assertNotEmpty($header_row);
        }
        }
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment