eclipse / vorto

Vorto Project
www.eclipse.org/vorto
Eclipse Public License 2.0
225 stars 106 forks source link

Allow opening the "request access to namespace" dialogue directly from a URL #2462

Closed kolotu closed 3 years ago

kolotu commented 4 years ago

The request access to namespace dialogue needs to be accessible directly from a URL.

ghost commented 4 years ago

If we want this to be available for non-authenticated users, it will need to strip down part of the functionality in the current form. For instance, the search for technical users should be disabled (prevents exposure of usernames to non-authenticated users). The search for public namespaces can probably be left as is.

Another feature that should not be part of the anonymously accessible form in my opinion, is the ability to create a technical user inline (see #2460 - not implemented in the original form as of yet).

Bottomline, this would reduce the functionality of the anonymous version of the form, in favor of a more conservative approach to anonymous users querying/modifying Vorto data.

@kolotu thoughts?

kolotu commented 4 years ago

@mena-bosch very good point. Let's go with the authenticated version first - that should be enough to start. We can check at a later point whether the anonymous version is still required.

ghost commented 4 years ago

@kolotu fair enough. The authenticated version would still have the problem of post-login redirects though. In other words, as of now, if you punch in a Vorto page that requires authentication and you are not authenticated, you are not redirected to that page past authentication, but to the home page.

Hopefully this is just some extra work, but I haven't checked feasibility/estimates yet.

kolotu commented 4 years ago

@mena-bosch yes that is the challenge for this task - and also a nice feature to have in general, I think.

ghost commented 4 years ago

I have decided to split up the "smart redirect" functionality and formalize it in #2470. Therefore the scope here would only be to provide the "standalone" version of the page.

ghost commented 4 years ago

PR here.

The standalone page can be reached at [host]:[port]/#/requestAccessToNamespace.

The code is very hack-ish, but I'm running out of time.

No coverage for now as this is UI-only.

Seems to work well with #2470, including with a 3 step process such as:

  1. Punch the URL
  2. Get redirected to login page
  3. Get redirected to GitHub
  4. Get redirected to requestAccessToNamespace after authentication successful
kolotu commented 4 years ago

Re-opened as the implementation does not work with Bosch ID / Eclipse ID

kolotu commented 4 years ago

Also the user ID shall be read from the query parameter "userId"