Skip to content

Allow idUser = 0 and allow submission without answerToken in this case#36

Merged
SebastienTainon merged 3 commits into
masterfrom
fix-allow-user-id-0
Nov 24, 2025
Merged

Allow idUser = 0 and allow submission without answerToken in this case#36
SebastienTainon merged 3 commits into
masterfrom
fix-allow-user-id-0

Conversation

@SebastienTainon

@SebastienTainon SebastienTainon commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Context: when FioiTaskImporter generates a signed task token to test the task, this token contains idUser = 0. This should be valid, like it was in TaskPlatform. And in this case, the user should be allowed to create a submission on the test task to check that it works correctly.

@SebastienTainon SebastienTainon marked this pull request as draft November 17, 2025 17:06
@SebastienTainon SebastienTainon removed the request for review from smadbe November 17, 2025 17:06
@SebastienTainon SebastienTainon changed the title Allow idUser = 0 in task token payload Allow idUser = 0 and allow submission without answerToken in this case Nov 17, 2025
@SebastienTainon SebastienTainon marked this pull request as ready for review November 17, 2025 17:21
Comment thread src/tokenization.ts Outdated

export interface PlatformGenericTokenPayload {
idUser: string|null,
idUser: string|number|null,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without getting fully the context, (IMO) it is a pitty to allow number just for a "test case". If idUser are strings, only strings should be given I would say.

@SebastienTainon SebastienTainon merged commit 6f47520 into master Nov 24, 2025
3 checks passed
@SebastienTainon SebastienTainon deleted the fix-allow-user-id-0 branch November 24, 2025 09:58
@SebastienTainon SebastienTainon restored the fix-allow-user-id-0 branch February 4, 2026 17:04
@SebastienTainon SebastienTainon deleted the fix-allow-user-id-0 branch February 4, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants