Skip to content

Conversation

rylev
Copy link
Contributor

@rylev rylev commented Nov 25, 2020

This PR cleans the Cosmos permissions related code. This is preparation for eventually moving all Cosmos models (i.e., Permissions, Databases, Stored Procedures, etc.) into their own module.

Highlights of the changes here:

  • Rename AuthorizationToken::Master to AuthorizationToken::Primary as the docs have begun to transition to this nomenclature.
  • Rearrange the module structure so that all permissions related types are grouped together.
  • Add docs for all the Permissions related types
  • Removed types that only existed for deserialization and added some serde attributes for correctly deserializing into the main type.
  • Removed PermissionResource as it wasn't really being used for much and made the code more complicated

TODO: I need to run the examples to ensure that the code still works 😄

Copy link
Contributor

@MindFlavor MindFlavor left a comment

Choose a reason for hiding this comment

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

Excellent work! I'm going to run the examples and the E2E tests and approve it.

@MindFlavor
Copy link
Contributor

The E2E tests fail to compile because of #89 (we should have tested it then but it slipped because of #49). Can you please fix the errors (it should be just a matter of renaming the with_xxx_client to into_xxx_client)? You can kick off the E2E tests compilation with cargo test --features=test_e2e.

@rylev
Copy link
Contributor Author

rylev commented Nov 26, 2020

@MindFlavor Sorry that I broke things! I'm going to make sure I'm running the e2e before submitting PRs from now on.

@rylev
Copy link
Contributor Author

rylev commented Nov 26, 2020

@MindFlavor This should be good to go now!

Copy link
Contributor

@MindFlavor MindFlavor left a comment

Choose a reason for hiding this comment

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

Just a little typo in one test. Once fixed we can merge this!

Co-authored-by: Francesco Cogno <francesco.cogno@outlook.com>
@rylev rylev merged commit 2876e88 into Azure:master Nov 26, 2020
@rylev rylev deleted the auth branch November 26, 2020 16:05
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

Successfully merging this pull request may close these issues.

2 participants