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

Add missing User endpoints for Management API #341

Merged
merged 5 commits into from
Jun 5, 2019

Conversation

joshcanhelp
Copy link
Contributor

Changes

Add methods for missing Users endpoints on the Management API:

  • \Auth0\SDK\API\Management\Users::getRoles()
  • \Auth0\SDK\API\Management\Users::removeRoles()
  • \Auth0\SDK\API\Management\Users::addRoles()
  • \Auth0\SDK\API\Management\Users::getEnrollments()
  • \Auth0\SDK\API\Management\Users::getPermissions()
  • \Auth0\SDK\API\Management\Users::removePermissions()
  • \Auth0\SDK\API\Management\Users::addPermissions()
  • \Auth0\SDK\API\Management\Users::getLogs()
  • \Auth0\SDK\API\Management\Users::generateRecoveryCode()
  • \Auth0\SDK\API\Management\Users::invalidateBrowsers()

References

Management API Users docs

Testing

  • This change adds test coverage

Checklist

  • All existing and new tests complete without errors.
  • The correct base branch is being used.

@joshcanhelp joshcanhelp marked this pull request as ready for review June 3, 2019 17:33
@joshcanhelp joshcanhelp requested a review from a team June 3, 2019 17:33
@joshcanhelp joshcanhelp added this to the 5.5.0 milestone Jun 3, 2019
@joshcanhelp joshcanhelp changed the title Add users roles permissions endpoints Add missing User endpoints for Management API Jun 3, 2019
Copy link

@peter279k peter279k left a comment

Choose a reason for hiding this comment

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

Some request changes I mention need to be concerned.

@peter279k
Copy link

I also found that this PHP package still requires php-5.5 version and it's not compatible with adding the string type hint for specific variable.

@@ -106,6 +106,7 @@ protected function checkInvalidPermissions(array $permissions)
}

foreach ($permissions as $permission) {

Choose a reason for hiding this comment

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

typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's iterating through an array, the $permission is the current array element.

@joshcanhelp
Copy link
Contributor Author

@peter279k - Correct, we still support PHP 5.5 currently so string type hints are not allowed.

@joshcanhelp joshcanhelp merged commit 8db6cfc into master Jun 5, 2019
@joshcanhelp joshcanhelp deleted the add-users-roles-permissions-endpoints branch June 5, 2019 17:33
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants