agentejo / cockpit

Add content management functionality to any site - plug & play / headless / api-first CMS
http://getcockpit.com
MIT License
5.39k stars 523 forks source link

Is there a way to restrict assets folder per group? #1492

Open silvester-pari opened 2 years ago

silvester-pari commented 2 years ago

Hello all, Cockpit is great so far! The only thing I am struggling with is setting a root for the assets manager - since we are managing multiple groups in the CMS it is crucial that each group sees only the own assets. Is this even possible?

What I have tried:

setting the finder.path

groups:
  testgroup:
    cockpit:
      accounts: false
      backend: true
      finder: true
    $vars:
      finder.path: /storage/uploads/testgroup/

This works to restrict the finder starting location, but not the assetsmanager folder

setting media.path

groups:
  testgroup:
    cockpit:
      accounts: false
      backend: true
      finder: true
    $vars:
      media.path: /storage/uploads/testgroup/
      <or>
      media.path: /testgroup/

I found this digging in some older issues (e.g. https://github.com/agentejo/cockpit/issues/72) but this seems to be changed in the newer versions

disabling assetsmanager completely

groups:
  testgroup:
    cockpit:
      accounts: false
      backend: true
      finder: true
      assetsmanager: false
      <or>
      assets: false
      <or>
      media: false

This does nothing.

Is there any way to achieve this? Either disabling assets completely, or setting a starting folder. Any help is much appreciated! Thanks