[Bug]: dnn api tokens persona bar visual issue
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start by reading utils.dateInPast and the token-status code shown in the issue, then check how the active/expired filter uses that status. Verify behavior with tokens expiring later today and tokens whose expiration times have passed today; done means the displayed status and filter distinguish them by time of day.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
When adding new tokens with expire datetime same day it will allways say Expired. But it is not.
json data from PersonaBar/Security/GetApiTokens is correct but visual status is wrong.
if (utils.dateInPast(new Date(props.apiToken.ExpiresOn), new Date())) { status = resx.get("Expired");
then from utils
dateInPast(firstDate, secondDate) { if (firstDate.setHours(0, 0, 0, 0) <= secondDate.setHours(0, 0, 0, 0))
it only looks at date not time. because <= is used and times are set to midnight.
Steps to reproduce?
Add token that expires later today. it will show as expired.
Also the filter is not working as expected. add more tokens all for today but some in past (time wise) and some later today. use filter for active/expired and you will see wrong results
Current Behavior
wrong status
Expected Behavior
also take time of day into account.
Still testing the other side of the token (auth on api) if token is seen as valid when calling with bearer token
I expect it will.
Relevant log output
Anything else?
No response
Affected Versions
10.2.2 (latest v10 release)
What browsers are you seeing the problem on?
Chrome
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 791
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 27
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dnnsoftware/Dnn.Platform
-
[Bug]: "Require a valid Profile for Login" cannot be turned off — saved to the wrong settings keyPossibly taken @idumlupinar claimed this 3 days ago. OpenStatus: New
Difficulty 1/5 Under an hour Newbie friendliness 86/100
dnnsoftware/Dnn.Platform#7586 · 3 comments · 1 reaction ·
Maintainers usually reply within 2 days
-
[Enhancement]: Add a search box to the Time Zone dropdownPossibly taken @idumlupinar claimed this 6 days ago. OpenStatus: New
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
dnnsoftware/Dnn.Platform#7579 ·
Maintainers usually reply within 2 days
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dnnsoftware/Dnn.Platform#6681 ·
Maintainers usually reply within 2 days
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dnnsoftware/Dnn.Platform#6051 · 4 comments ·
Maintainers usually reply within 2 days
-
[Enhancement]: Offer opening Persona Bar items in a new browser tabPossibly taken @idumlupinar claimed this 6 days ago. OpenStatus: New
Difficulty 3/5 1-2 days Newbie friendliness 55/100
dnnsoftware/Dnn.Platform#7581 ·
Maintainers usually reply within 2 days
All issues in dnnsoftware/Dnn.Platform
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement no-stack-trace
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
greenshot/greenshot#1618 · 3 comments ·
Maintainers usually reply within 1 day
-
squad/utforming status/triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Altinn/altinn-studio#21565 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Tyrrrz/YoutubeDownloader#912 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day