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

Support project listing for a device being accessed over a tunnel #2230

Merged
merged 3 commits into from
Jun 7, 2023

Conversation

Steve-Mcl
Copy link
Contributor

closes #2228

Description

  • Update pre-handler in packages/flowforge/forge/routes/api/team.js to allow a device with token to pass to the routes
  • Update IMPLICIT_TOKEN_SCOPES.devices in packages/flowforge/forge/routes/auth/permissions.js to permit the permission 'team:projects:list'
  • Add context to the @depreciated comment on route /api/v1/teams/:teamId/projects
  • Adds tests:
    Team API
    Get list of a teams projects
    ✔ Device can get a list of team projects
    ✔ Device can not get a list of team projects without a valid token
    ✔ Device can not get a list of team projects for a different team

Related Issue(s)

#2228

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@Steve-Mcl Steve-Mcl requested a review from knolleary June 6, 2023 09:23
forge/routes/api/team.js Outdated Show resolved Hide resolved
Copy link
Member

@knolleary knolleary left a comment

Choose a reason for hiding this comment

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

One comment to fix - proposed change included.

Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
@Steve-Mcl Steve-Mcl requested a review from knolleary June 7, 2023 07:43
@knolleary knolleary merged commit 804176f into main Jun 7, 2023
@knolleary knolleary deleted the 2228-fix-empty-target-list-in-project-link-nodes branch June 7, 2023 09:42
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.

Project nodes cannot list the teams projects/instances over tunnel
2 participants