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

Permission Group: admin screen/s #7090

Open
4 tasks
Tracked by #5953
davidwatkins73 opened this issue Jun 10, 2024 · 2 comments
Open
4 tasks
Tracked by #5953

Permission Group: admin screen/s #7090

davidwatkins73 opened this issue Jun 10, 2024 · 2 comments

Comments

@davidwatkins73
Copy link
Member

davidwatkins73 commented Jun 10, 2024

  • Create involvement groups
  • Create permission groups
  • Add apps to permission group
  • Add involvements to involvement group
@davidwatkins73 davidwatkins73 changed the title Admin screen/s for Permission Group: admin screen/s Jun 10, 2024
@davidwatkins73
Copy link
Member Author

Some doc on permissions in general:

d2

title: Permissions {
  near: top-center
  shape: text
  style: {
    font-size: 40
    bold: false
    underline: false
  }
}

cg: Coarse Grained {
  u: user
  r: role
  ur: user role
  u <- ur
  r <- ur

  explanation: |md
    ## Coarse Grained

    - Granted to specific users
    - Applies to all entities

    Example:

    Users with the _Flow Admin_ role can update any flow
  |
}

fg: Fine Grained {
  explanation: |md

      ## Fine Grained

      - Defines permissions in terms of involvement
      - Involvements tie people to specific entities

    Example

    Only _Asset Owners_ can update _Functions_

  |

  pg: permission group
  ig: involvement group
  i: involvement
  ik: involvement kind
  pers: person
  ref: entity

  pg -> ig
  ig -> i
  pers <- i
  ik <- i
  ref <- i
}

@davidwatkins73
Copy link
Member Author

davidwatkins73 commented Jul 11, 2024

Query for viewing the current set of fine grained permissions:

select pg.name, pg.external_id, pg.id,
       pgi.parent_kind, pgi.subject_kind,
       pgi.qualifier_kind, pgi.qualifier_id, coalesce(mc.name, ad.name, null),
       pgi.operation,
       ig.name, ig.id, ig.external_id,
       ik.name, ik.external_id, ik.id
from involvement_group ig
inner join permission_group_involvement pgi on ig.id = pgi.involvement_group_id
inner join involvement_group_entry ige on ig.id = ige.involvement_group_id
inner join involvement_kind ik on ik.id = ige.involvement_kind_id
inner join permission_group pg on pg.id = pgi.permission_group_id
left join measurable_category mc on pgi.qualifier_id = mc.id and pgi.qualifier_kind = 'MEASURABLE_CATEGORY'
left join assessment_definition ad on pgi.qualifier_id = ad.id and pgi.qualifier_kind = 'ASSESSMENT_DEFINITION'
;

Things to note:

  • This doesn't bring back the entity level overrides if the permission group (pg) is not the default
    • that should probably be handled by a new query
  • Assuming the only qualifier entities are assessments and measurables
    • Remember qualifiers are optional, hence the left joins on mc and ad

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