frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Allow burger menu when not logged in

Open cchndl opened this issue 6 months ago • 10 comments

(Possible duplicate: Make "About" and "Help" sections configurable #1745)

  • Browsing public Proposals without being logged in is difficult.

Anonymous access to public/published resources

The following API endpoints are partly publicly accessible w/o login (see http status codes). All publicly accessible endpoints should also be accessible from the burger menu in the frontend w/o login.

Please note URLs are just examples (not accessible externally)

cchndl avatar Jun 06 '25 08:06 cchndl

@cchndl check this PR https://github.com/SciCatProject/frontend/pull/1860 IT also includes the hamburger menu with access to all the public pages.

nitrosx avatar Jun 16 '25 09:06 nitrosx

That looks good! I have not checked for everything in my list, but on first look its nice. Looking forward to it.

cchndl avatar Jun 26 '25 07:06 cchndl

Clicking on Instruments, Proposals, Samples just shows the Login dialog.

Displaying and downloading of files in a published dataset works

cfelder avatar Jun 27 '25 13:06 cfelder

Isn't this solved in #1952? I think we can close now.

sbliven avatar Sep 08 '25 08:09 sbliven

No it isn't see my previous comment please.

cfelder avatar Sep 08 '25 09:09 cfelder

I guess it is not so much an menu problem, but mainly the handling of the access to the affected pages. Even if e.g. listing instruments is possible via the API, the FE currently requires a logged in user, hence the redirect to to the login. Which may depend on the config (see end of https://github.com/SciCatProject/frontend/blob/master/src/assets/config.json) @Christian: On your instance ( scicat.dev.ocp....) the config does not contains the new menu config fields.

bpedersen2 avatar Sep 08 '25 10:09 bpedersen2

I did a test as well: It really fails

browser console log when selecting 'Instriuments' from the burger menu:

chunk-CY6RAXMZ.js:1 Action came in! [Dataset] Clear Batch
13:12:57.911
polyfills-SR4QCVPH.js:1 
 GET https://devcat.k8s-test.frm2.tum.de/api/v3/users/my/self 401 (Unauthorized)
13:12:57.913
chunk-CY6RAXMZ.js:1 Action came in! [Dataset] Clear Batch
13:12:57.923
chunk-KBZ7V7GZ.js:1 Action came in! [User] Update Has Fetched User Settings
13:12:57.941
polyfills-SR4QCVPH.js:1 XHR failed loading: GET "https://devcat.k8s-test.frm2.tum.de/api/v3/users/my/self".

It looks like there is first a try get user infos that fails (obviously ) and that redirects to login (which is correct)

bpedersen2 avatar Sep 08 '25 11:09 bpedersen2

@christian: On your instance ( scicat.dev.ocp....) the config does not contains the new menu config fields.

Thanks for pointing that out. We've added the necessary config to the json, currently displaying all menu items.

cfelder avatar Sep 08 '25 11:09 cfelder

The problem is that the user-settings are requested and that is not correctly handled for no user. Needs some work...

bpedersen2 avatar Sep 08 '25 11:09 bpedersen2

Can it be the Clear Batch (that requires a user) that is somehow called when it shouldn't? There is a separate ClearBatch OnLogout that does not require a user.

bpedersen2 avatar Sep 09 '25 12:09 bpedersen2