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

Admin Register and Admin Login links do not show up. #420

Open
4 tasks done
kaladay opened this issue Jan 23, 2025 · 2 comments · Fixed by #421
Open
4 tasks done

Admin Register and Admin Login links do not show up. #420

kaladay opened this issue Jan 23, 2025 · 2 comments · Fixed by #421
Assignees
Labels
bug Something isn't working

Comments

@kaladay
Copy link

kaladay commented Jan 23, 2025

  1. What is the type of this issue?
    • User

      • Functional: the expected or intended functionality is not provided.
        Anonymous users need to be able to register and login as admins if allowed such access.
    • Developer
      A developer needs to locally regiter and login for any tasks restricted to certain access.

    • Operational
      Administrators need to be able to register and login.

The cause of why this is now suddenly a problem is unknown.

The existing logic here:

 *ngIf="(isAuthenticated | async) === false"

The explicit requirement for false is fine boolean logic, but it turns out that it is not actually fine in practice.
The isAuthenticated is now some non-boolean literal value and is instead likely undefined or null.

Inverting the logic to *ngIf="(isAuthenticated | async) !== true" appears to solve the problem.

@kaladay kaladay added the bug Something isn't working label Jan 23, 2025
@kaladay kaladay self-assigned this Jan 23, 2025
@kaladay kaladay moved this to 🏃 On Sprint in Scholars@TAMU Jan 23, 2025
@kaladay kaladay linked a pull request Jan 23, 2025 that will close this issue
1 task
@wwtamu
Copy link

wwtamu commented Jan 24, 2025

Are we sure this is not a development environment issue? This is not reproducible on labs, demos, or production.

Auth state authenticated is set false by default, https://github.com/TAMULib/scholars-angular/blob/tamu-main/src/app/core/store/auth/auth.reducer.ts#L28.

It is changed only by means of dispatching actions in which only one of them determines the authenticated value from logic.

https://github.com/TAMULib/scholars-angular/blob/tamu-main/src/app/core/store/auth/auth.effects.ts#L205
https://github.com/TAMULib/scholars-angular/blob/tamu-main/src/app/core/service/rest.service.ts#L23

Is it possible your work machine browser is configured overly secure and blocking JavaScript and/or it reading cookies?

@Dbreck-TAMU
Copy link

This issue exists on prod and each Scholars environment.

For further explanation, if a user has never logged into Scholars they cannot see the registration or login link. Please see the attached screenshot.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🏃 On Sprint
Development

Successfully merging a pull request may close this issue.

3 participants