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

Get POSTing a GroupPermission working #98

Open
lewisrenfrew opened this issue Feb 27, 2024 · 0 comments
Open

Get POSTing a GroupPermission working #98

lewisrenfrew opened this issue Feb 27, 2024 · 0 comments
Assignees

Comments

@lewisrenfrew
Copy link
Contributor

lewisrenfrew commented Feb 27, 2024

  • I think you've done all the domain and facade work required to add a new GroupPermission to the database, so the bit thats left is just wiring it up to the endpoint handlers in the module
  • You'll need to decide how the client is going to specify that it is a group permission they are trying to create, since currently there is only one POST endpoint to authorisation/permissions (which currently only handles the individual case). You could either:
    • make two seperated endpoints, one specific for groups, one specific for individuals... or
    • check the PermissionResource in your module handler function and check if the GranteeGroupId field is not null. We can use the presence/absence of this field to infer whether its a GroupPermission or an IndividualPermission the client is trying to create, and call the correct service method accordingly
      I think the second option is probably less work
  • Then you could add some integration tests for WhenPostingGroupPermission. It'll be very similiar to the current WhenPosting tests https://github.com/linn/authorisation/tree/master/tests/Integration/Integration.Tests/PermissionsModuleTests which you might want to rename to WhenPostingIndividualPermission
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