Subscribe to group permission is disabled
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3536774. -->
Reported by: [loze](https://www.drupal.org/user/116906)
Related to !43
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>See the screenshot</p>
<p>The checkbox for non-members to subscribe to the group is greyed out and checked. I want to have an admin add people to a group and not have to subscribe themselves, but I cant uncheck this.</p>
<p>This code here</p>
<pre>// Show a column of disabled but checked checkboxes.<br> // Only applies to admins or default roles.<br> if ($roles[$rid]->get('is_admin') ||<br> in_array($rid_simple, $permission->getDefaultRoles())) {<br> $form['permissions'][$permission_name][$rid]['#disabled'] = TRUE;<br> $form['permissions'][$permission_name][$rid]['#default_value'] = TRUE;<br> }</pre><p>
disables the checkbox if it is a default role. A default role should still be able to be unselected though.</p>
<p><code>in_array($rid_simple, $permission->getDefaultRoles())</code> should select it.<br>
<code>$roles[$rid]->get('is_admin')</code> should disable it. (select it too?)</p>
issue