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

Skip over expired Roles #904

Merged
merged 1 commit into from
Apr 6, 2017
Merged

Skip over expired Roles #904

merged 1 commit into from
Apr 6, 2017

Conversation

russjones
Copy link
Contributor

Purpose

At the moment, GetRoles potentially returns something like the following in the Web UI sometimes:

role foo@example.com is not found
If you believe this is an issue with Teleport, please create a GitHub issue.

This is because GetRoles does not skip over expired roles. This PR changes this behavior and skips over expired roles.

Implementation

  • When calling GetRole, check if the error is a trace.IsNotFound and if it is, skip over it.

@russjones russjones force-pushed the rjones/get-roles-fix branch from b527406 to aacc163 Compare April 6, 2017 19:18
Copy link
Contributor

@klizhentas klizhentas left a comment

Choose a reason for hiding this comment

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

you need to use append, because this way with continue you will get empty roles what is not good

@russjones russjones force-pushed the rjones/get-roles-fix branch from aacc163 to d59326d Compare April 6, 2017 19:23
@klizhentas
Copy link
Contributor

@russjones you have typo in your PR (i declared and not used)

@russjones russjones force-pushed the rjones/get-roles-fix branch from d59326d to d330d68 Compare April 6, 2017 19:37
@russjones russjones merged commit bfd76f1 into master Apr 6, 2017
@russjones russjones deleted the rjones/get-roles-fix branch April 6, 2017 19:41
hatched pushed a commit that referenced this pull request Feb 1, 2023
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