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

Show functions from organizations #353

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@ivanayov
Member

ivanayov commented Dec 5, 2018

Description

With this change users will be able not only to see functions they
own, but also the ones that belong to the organizations they are
members of

Closes 1. and 2. from #347

How Has This Been Tested?

Deployed the dashboard + list-functions on a cluster.
Tested with docwareiy/of-cloud-dashboard:0.3.1-list-orgs-fn
After setting a cookie of type openfaas_cloud_token=<jwt with organizations> the listed functions were functions from the user + functions from orgs.

After deleting the cookie, listed functions were only functions from user.

Tested with OAuth it's listing functions from both user and orgs, sorting the user first.

How are existing users impacted? What migration steps/scripts do we need?

N/A

Checklist:

I have:

  • updated the documentation and/or roadmap (if required) N/A
  • read the CONTRIBUTION guide
  • signed-off my commits with git commit -s
  • added unit tests
@alexellis

This comment has been minimized.

Member

alexellis commented Dec 6, 2018

Unfortunately we can't read the cookie on the client side, as it's set to HTTP only. We need to move this JavaScript code into the dashboard backend which is a node function.

Here's an example of how we've done this with the logout functionality with @bartsmykla

of-dashboard-cookie-claims

@alexellis

Please see comments

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/list-functions-from-orgs branch 3 times, most recently from 473d6ed to e71ff7b Dec 11, 2018

@ivanayov

This comment has been minimized.

Member

ivanayov commented Dec 11, 2018

@alexellis the code is now moved to the backend and tested with OAuth

@alexellis

This comment has been minimized.

Member

alexellis commented Dec 11, 2018

That's awesome!

Do we have an issue to show the username as a box with the initials i.e. [OF] / [AE] for when there is more than one org+user?

@ivanayov

This comment has been minimized.

Member

ivanayov commented Dec 11, 2018

Yes, it's #359

Show functions from organizations
With this change users will be able not only to see functions they
own, but also the ones that belong to the organizations they are
members of

Signed-off-by: Ivana Yovcheva <iyovcheva@vmware.com>

@ivanayov ivanayov force-pushed the ivanayov:ivanayov/list-functions-from-orgs branch from e71ff7b to 7a6250e Dec 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment