Hi, new to Cockpit. Loving it so far.
Anyway, been trying out Cockpit through Docker, to try it out. I can’t seem to find out where to create user groups and set permissions.
Am I overlooking something…?
Thanks!
Hi, new to Cockpit. Loving it so far.
Anyway, been trying out Cockpit through Docker, to try it out. I can’t seem to find out where to create user groups and set permissions.
Am I overlooking something…?
Thanks!
via https://github.com/serjoscha87/cockpit_GROUPS . Currently bugged, see issues.
Oh, I didn’t even know there was a groups add-on. Will check that out.
Thanks.
You can create groups via config file.
example for /config/config.php
:
https://getcockpit.com/documentation/reference/configuration
# define additional groups
'groups' => [
'author' => [
'$admin' => false,
'$vars' => [
'finder.path' => '/storage/upload'
],
'cockpit' => [
'backend' => true,
'finder' => true
],
'collections' => [
'manage' => true
]
]
],
example for /config/config.yaml
instead:
groups:
author:
cockpit:
backend: true
collections:
manage: true
Could anyone provide some more detailed description of the options and possibilities these group-settings can have? An example is nice, but for me it is not clear, what
groups:
author:
cockpit:
backend: true
actually means.
My concrete questions:
i got the exact same question.
Did you have any new info?
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
groups:
GROUP_NAME:
RESOURCE_NAME:
ACTION_NAME:
BOOLEAN
and (most of) the hasaccess
methods follow that pattern:
'hasaccess' => function($resource, $action, $group = null) {
This is what I was able to extract from the source code:
Also searching for getGroupVar(
the following variables can be extracted
Untested but this follows the pattern.
groups:
GROUP_NAME:
RESOURCE_NAME:
entries_delete: false
entries_view: false
entries_create: true
entries_edit: false
And I’m not sure but the following group variables that might have an impact on that matter of confining a user group to a specific directory