Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-aware permission auto-scaling #370

Open
krystian-panek-vmltech opened this issue Oct 26, 2022 · 0 comments
Open

Content-aware permission auto-scaling #370

krystian-panek-vmltech opened this issue Oct 26, 2022 · 0 comments

Comments

@krystian-panek-vmltech
Copy link

krystian-panek-vmltech commented Oct 26, 2022

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 ... 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant