Answers.Body: <p>There's not a native way to do this, but you might want to consider adding it as a <a href="http://feedback.craftcms.com" rel="nofollow">feature request</a>.</p>
  
  <p>In the meantime, you might be able to work around it a bit with some custom JS in the control panel and using something like the <a href="https://github.com/lindseydiloreto/craft-cpjs" rel="nofollow">Control Panel JS</a> plugin.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-14T03:41:58.437Z
Answers.LastActivityDate: 2016-05-14T03:41:58.437Z
Answers.UserDisplayName: Brad Bell
Body: <p>When I create a permission using the registerUserPermissions hook I would like everyone, in all user groups have access to that permission. An admin has to take an explicit step to restrict access to that pemission. Something like this:</p>
  
  <pre><code>/**
   * @return array
   */
  public function registerUserPermissions()
  {
      return array(
          'my-permission' =&gt; array(
              'label' =&gt; Craft::t('Edit Settings'),
              //****ENABLE BY DEFAULT****
              'enable'=&gt; true
          ),
      );
  }
  </code></pre>
  
Tags: <permissions>
Title: Is there any way to set enable by default a permission on the registerUserPermissions hook?
ThreadText: # Is there any way to set enable by default a permission on the registerUserPermissions hook?
  
  (Asked by: username_0 on 2016-05-13)
  
  When I create a permission using the registerUserPermissions hook I would like everyone, in all user groups have access to that permission. An admin has to take an explicit step to restrict access to that pemission. Something like this:
  
  ```
  /**
   * @return array
   */
  public function registerUserPermissions()
  {
      return array(
          'my-permission' => array(
              'label' => Craft::t('Edit Settings'),
              //****ENABLE BY DEFAULT****
              'enable'=> true
          ),
      );
  }
  
  ```
  
  **Tags:** permissions
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-05-14. Score: 1 | Accepted answer
  
  There's not a native way to do this, but you might want to consider adding it as a [feature request](http://feedback.craftcms.com).
  
  In the meantime, you might be able to work around it a bit with some custom JS in the control panel and using something like the [Control Panel JS](https://github.com/lindseydiloreto/craft-cpjs) plugin.
  
  
  ---
  
  