Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Feature/auth support #20

Merged
merged 6 commits into from
Apr 14, 2020
Merged

Feature/auth support #20

merged 6 commits into from
Apr 14, 2020

Conversation

bmikaili
Copy link
Contributor

Add the .auth() modifier to the Create and CRUD component.

Description

To limit users to only be able to act on resources they own/created, the Create component is extended to use the .auth() modifier and a SecureCRUD component is added that creates CRUD components with that behaviour.

Related Issue

Closes #19

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • SwiftLint throws no warnings or errors.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@bmikaili bmikaili added the enhancement New feature or request label Apr 13, 2020
@bmikaili bmikaili requested a review from PSchmiedmayer April 13, 2020 12:28
Copy link
Contributor

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice first draft. I had a few comments, e.g. regarding the auth modifier on CRUD. Looking forward to your thoughts!

Sources/Corvus/Endpoints/SecureCRUD.swift Outdated Show resolved Hide resolved
Sources/Corvus/Endpoints/SecureCRUD.swift Outdated Show resolved Hide resolved
Copy link
Contributor

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! The only comment would be to make the new CRUD initializer internal. Otherwise this looks great!

Sources/Corvus/Endpoints/Delete/Delete.swift Show resolved Hide resolved
Sources/Corvus/Endpoints/CRUD.swift Show resolved Hide resolved
Sources/Corvus/Endpoints/CRUD.swift Outdated Show resolved Hide resolved
@bmikaili bmikaili merged commit 91159af into develop Apr 14, 2020
@bmikaili bmikaili deleted the feature/auth-support branch May 6, 2020 12:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add .auth modifier to CRUD and Create components.
2 participants