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

aclpolicy - grant access to multiple project in 1 file #1997

Closed
amitdaniel86-zz opened this issue Aug 10, 2016 · 3 comments
Closed

aclpolicy - grant access to multiple project in 1 file #1997

amitdaniel86-zz opened this issue Aug 10, 2016 · 3 comments

Comments

@amitdaniel86-zz
Copy link

Hi ,

I would like to get access to multiple project in 1 aclpolicy file .

Tried to do something like that but it's not worked for me .

# create or append this to a .aclpolicy file

---
by:
  group: XXXXXX_XXXX
context:
  application: rundeck
for:
  project:
  - allow: read
    equals:
      name: [project1, project2]
description: generated
# create or append this to a .aclpolicy file

---
by:
  group: XXXXXX_XXXX
context:
  project: [project1, project2]
for:
  job:
  - allow:
    - read
    - run
    - kill
    match:
      group: "(group1|group2)"
description: generated
# create or append this to a .aclpolicy file

Thanks for your help

@gschueler
Copy link
Member

for the context: project: ... part, use a regular expression, e.g.

context:
  project: '(project1|project2)' # all projects

for the application context section, use a match instead of equals and use a regular expression:

for:
  project:
  - allow: read
    match:
      name: '(project1|project2)'

or, you can simply define multiple sections for equals:

for:
  project:
  - allow: read
    equals:
      name: project1
  - allow: read
    equals:
      name: project2

@amitdaniel86-zz
Copy link
Author

amitdaniel86-zz commented Aug 11, 2016

thanks ,

how i can use regular expressions for " Not project " i mean

name: '(Project1|Project2)'

name: '(!project3)'

negative lookback is supported ?

Thanks ,
Amit

@amitdaniel86-zz
Copy link
Author

Found the solution :

name: '(?!(Project3)).+'

Thanks !!!

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

2 participants