Skip to content

Content-aware permission auto-scaling #370

Open
@krystian-panek-vmltech

Description

@krystian-panek-vmltech

Content may dynamically grow horizontally and be multi-tenant/lang|market. However usually APM scripts are not so dynamic and are having statically defined websites|markets|language branches and they are not so adaptive. What if such node names (website name: 'mysite', 'wknd', 'locale': 'en', 'us', language: 'en', 'fr') could be scanned automatically then APM script would be able to create missing groups and apply permissions as soon as when new website|market|language is created.

The content may grow due to various techniques used: new site created from blueprint, new language copy, node copy/pasted in crx, node copy/pasted or generated by Groovy Script. Because hooking into all of these various content creation methods is almost impossible, it would be nice to run such dynamic APM script periodically. It will then guarantee that permissions are always applied on time.

Currently APM allows to have:

FOR-EACH i IN ['a', 'b', 'c', 'd']

However what if APM will support sth like:

// 'wknd', 'wknd-demo', 'mysite' // all siblings
FOR-EACH i IN node_names('/content/*')

or

// 'wknd', 'wknd-demo' // all siblings with prefix
FOR-EACH i IN node_names('/content/wknd*')

(maybe such foreach loop then could be nested to traverse locales then markets in each website)

or

// 'wknd', 'wknd-demo' // all siblings with prefix
FOR-EACH site IN sites('/content/*')

  PRINT "current site: /content/${site.name}/${site.country}/${site.language}"

  // any combination reflecting company policies
  CREATE-GROUP "${site.name}-admins" 
  CREATE-GROUP "${site.name}-${site.country}-authors"
  CREATE-GROUP "${site.name}-${site.country}-approvers"

  CREATE-GROUP "${site.name}-${site.country}-${lang}-authors"
  CREATE-GROUP "${site.name}-${site.country}-${site.lang}-approvers"

  ALLOW ... 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions