Answers.Body: <p>I've just updated <a href="https://verbb.io/craft-plugins/comments/docs/get-started/configuration#permissions" rel="nofollow noreferrer">the docs</a>, but because it uses the UID of element &quot;groups&quot; it might be annoying in practice to use the config file to set this up, as it requires a bit of manual looking-up of these values.</p>
  <p>As the plugin settings are stored in Project Config, you'll probably get the same value setting it through the control panel.</p>
  <pre class="lang-php prettyprint-override"><code>'permissions' =&gt; [
      'craft\elements\Asset' =&gt; [
          // Volume UIDs
          '33974e79-b3b6-47ec-af91-4519fe4985be',
          'c194716f-aa74-40b6-8426-c835599cbe93',
      ],
  
      'craft\elements\Category' =&gt; [
          // Category Group UIDs
          'a27827c8-4810-433c-acb9-261b53d46281',
          '346194f0-6da8-4f46-a20b-795631ee9a5f',
      ],
  
      'craft\elements\Entry' =&gt; [
          // Section UIDs
          'a8d4bdf1-164e-4ddc-aaad-640026b8d3bf',
      ],
  
      'craft\elements\User' =&gt; [
          // User Group UIDs
          'c23a4d8d-47f0-4e71-927c-d5897ec9c9f8',
      ],
  ],
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-17T11:46:51.537Z
Answers.Text: Thanks @crawf! Relying on project config makes sense. We like the idea of using the PHP config file though. We are disabling admin setting changes outside local environments (i.e. no UI for comments settings in staging or prod) and think it's easier for devs to lookup configs from the PHP file than the YAML files...
Answers.UserDisplayName: Marie Manandise
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-11T00:00:58.750Z
Answers.LastActivityDate: 2021-05-11T00:00:58.750Z
Answers.UserDisplayName: crawf
Body: <p>I'm using the comments plugin (<a href="https://plugins.craftcms.com/comments" rel="nofollow noreferrer">https://plugins.craftcms.com/comments</a>)</p>
  <p>I'd like to define the 'permissions' settings via the <code>config/comments.php</code> file but can't find docs on the syntax to use.</p>
  <p>The default reads</p>
  <pre><code>    // Permissions
     'permissions' =&gt; [],
  </code></pre>
  <p>which doesn't give me much to go on.</p>
  <p>Could someone please provide an example I could work out the correct syntax from?</p>
  <p>Many thanks!</p>
  
Tags: <comments>
Title: Syntax for permissions in comments.php config file (comments plugin by Verbb)
ThreadText: # Syntax for permissions in comments.php config file (comments plugin by Verbb)
  
  (Asked by: username_0 on 2021-05-10)
  
  I'm using the comments plugin (<https://plugins.craftcms.com/comments>)
  
  I'd like to define the 'permissions' settings via the `config/comments.php` file but can't find docs on the syntax to use.
  
  The default reads
  
  ```
      // Permissions
     'permissions' => [],
  
  ```
  
  which doesn't give me much to go on.
  
  Could someone please provide an example I could work out the correct syntax from?
  
  Many thanks!
  
  **Tags:** comments
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-05-11. Score: 1
  
  I've just updated [the docs](https://verbb.io/craft-plugins/comments/docs/get-started/configuration#permissions), but because it uses the UID of element "groups" it might be annoying in practice to use the config file to set this up, as it requires a bit of manual looking-up of these values.
  
  As the plugin settings are stored in Project Config, you'll probably get the same value setting it through the control panel.
  
  ```php
  'permissions' => [
      'craft\elements\Asset' => [
          // Volume UIDs
          '33974e79-b3b6-47ec-af91-4519fe4985be',
          'c194716f-aa74-40b6-8426-c835599cbe93',
      ],
  
      'craft\elements\Category' => [
          // Category Group UIDs
          'a27827c8-4810-433c-acb9-261b53d46281',
          '346194f0-6da8-4f46-a20b-795631ee9a5f',
      ],
  
      'craft\elements\Entry' => [
          // Section UIDs
          'a8d4bdf1-164e-4ddc-aaad-640026b8d3bf',
      ],
  
      'craft\elements\User' => [
          // User Group UIDs
          'c23a4d8d-47f0-4e71-927c-d5897ec9c9f8',
      ],
  ],
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks @username_1! Relying on project config makes sense. We like the idea of using the PHP config file though. We are disabling admin setting changes outside local environments (i.e. no UI for comments settings in staging or prod) and think it's easier for devs to lookup configs from the PHP file than the YAML files...  
  
  ---
  
  