Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 571594

Summary: Show login status on download.e.o and archive.e.o
Product: Community Reporter: Denis Roy <denis.roy>
Component: WebsiteAssignee: Eclipse Web <webdev>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: chris.guindon, dh_tue, ed, eric.poirier
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=571595
Whiteboard:

Description Denis Roy CLA 2021-03-01 10:13:46 EST
If you navigate to a "404" page handled by the EF 404 handler (such as https://archive.eclipse.org/escet/) the login status in the upper corner doesn't work.

I believe the page is a barebones template and, considering the high volume of 404s served by download and archive, I'd like to make it as lightweight as possible (ie, not necessarily load sessions on each page hit).

Is there a way to detect the ECLIPSESESSION cookie and show the correct login session on those 404 pages without too much overhead/cost?
Comment 1 Christopher Guindon CLA 2021-03-02 11:06:26 EST
(In reply to Denis Roy from comment #0)
> If you navigate to a "404" page handled by the EF 404 handler (such as
> https://archive.eclipse.org/escet/) the login status in the upper corner
> doesn't work.
> 
> I believe the page is a barebones template and, considering the high volume
> of 404s served by download and archive, I'd like to make it as lightweight
> as possible (ie, not necessarily load sessions on each page hit).
> 
> Is there a way to detect the ECLIPSESESSION cookie and show the correct
> login session on those 404 pages without too much overhead/cost?

Denis,

How about we apply this rule to all our pages?

So instead of loading the ECLIPSESSION on each page, we could hardcode the "Edit my Account" link as we do with our static sites such as https://iot.eclipse.org/
Comment 2 Christopher Guindon CLA 2021-03-02 11:15:57 EST
Denis, 

I am realizing that you are asking for the opposite. You would like to keep that behavior.


If you are looking for a lightweight solution:

- Create an API endpoint that accepts session cookies from eclipse.org. 
- Endpoint would return the current state of the user with additional information such as their name.
- Use data to display welcome links via javascript once the page is loaded.

It goes without saying that we will want to protect this endpoint.
Comment 3 Denis Roy CLA 2021-06-10 09:47:31 EDT
Chris, whatever is the simplest method of detecting the current user. We are running PHP so we could leverage local methods. Right now login on download and archive is broken.
Comment 4 Denis Roy CLA 2021-06-10 09:55:55 EDT

*** This bug has been marked as a duplicate of bug 565186 ***