# Where to create user groups?

**URL:** <https://discourse.getcockpit.com/t/where-to-create-user-groups/1182>\
**Category:** Support\
**Created:** [January 30, 2020, 9:16pm UTC](https://discourse.getcockpit.com/t/where-to-create-user-groups/1182 "2020-01-30T21:16:52Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![abernh](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/abernh/32/859_2.png) [@abernh](https://discourse.getcockpit.com/u/abernh)\
**Post date:** [July 5, 2021, 12:16pm UTC](https://discourse.getcockpit.com/t/where-to-create-user-groups/1182/7 "2021-07-05T12:16:23Z")

</div>

If you search the source for `->hasaccess` you can find all kind of checks for specific resource access checks.

The group config matches the following pattern

```auto
  groups:
    GROUP_NAME:
      RESOURCE_NAME:
        ACTION_NAME:
          BOOLEAN

```

and (most of) the `hasaccess` methods follow that pattern:

```auto
    'hasaccess' => function($resource, $action, $group = null) {

```

### Resources : Actions

This is what I was able to extract from the source code:

- cockpit: accounts, backend, unlockresources, finder, settings, rest, webhooks, info
- collections: delete, create, manage
- forms: manage, create
- singletons: delete, create, manage
- SINGLETON\_NAME: edit, form
- COLLECTION\_NAME: entries\_delete, entries\_view, entries\_create (collection\_create) , entries\_edit (collection\_edit)

### $vars

Also searching for `getGroupVar(` the following variables can be extracted

- var : default
- media.path : ‘/’
- finder.path : ‘’
- allowed\_uploads : ‘\*’
- finder.allowed\_uploads : allowed\_uploads
- assets.allowed\_uploads : allowed\_uploads
- max\_upload\_size : 0
- assets.max\_upload\_size : max\_upload\_size

---

_[View the full topic](https://discourse.getcockpit.com/t/where-to-create-user-groups/1182)._
