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

When transforming a modular model back to DSL, specify module in comments #180

Closed
Tracked by #148
rhamzeh opened this issue Mar 7, 2024 · 0 comments · Fixed by #206
Closed
Tracked by #148

When transforming a modular model back to DSL, specify module in comments #180

rhamzeh opened this issue Mar 7, 2024 · 0 comments · Fixed by #206

Comments

@rhamzeh
Copy link
Member

rhamzeh commented Mar 7, 2024

For example, for the modular model specified here, this will be the combined DSL:

model
  schema 1.2

## module = core; filename = ./core.fga
type user

type organization
  relations
    define member: [user]
    define admin: [user]
    ## extended by: module = confluence; filename = ./confluence.fga
    define can_create_page: member
    ## extended by: module = jira; filename = ./jira/projects.fga
    define can_create_project: member

type group
  relations
    define member: [user]

## module = confluence; filename = ./confluence.fga
type space
  relations
    define organization: [organization] 

type page
  relations
    define space: [space]
    define owner: [user]

## module = jira; filename = ./jira/projects.fga
type project
  relations
    define organization: [organization]

## module = jira; filename = ./jira/tickets.fga
type ticket
  relations
    define project: [project]
    define owner: [user]

Note that ideally the extended relations will be sorted last and by module/filename

@rhamzeh rhamzeh mentioned this issue Mar 7, 2024
10 tasks
@ewanharris ewanharris linked a pull request Mar 21, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants