Scille/parsec-cloud

[๐Ÿ› | Bug]: Invite complete command after device invitation fails when the greeter is a standard user

Closed this issue ยท 0 comments

Parsec version tested on:

3.0.2-rc.1

Platforms tested on:

Any

Bug description:

This legacy code has been missed during the review:

if current_profile != UserProfile.ADMIN:
return InviteCompleteBadOutcome.AUTHOR_NOT_ALLOWED

Relevant output:

Corresponding log

[2024-10-01 16:31:53.580] [debug] Error when calling greeterDeviceInProgress4DoCreate: GreetInProgressErrorUserCreateNotAllowed (Not allowed to create a user)
[2024-10-01 16:32:10.225] [debug] Error when calling greeterDeviceInitialDoWaitPeer: GreetInProgressErrorCancelled (Operation cancelled)
[2024-10-01 16:32:10.226] [debug] Error when calling claimerGreeterAbortOperation: ClaimerGreeterAbortOperationErrorInternal (Invalid Handle)

Note: the error is also wrong due to this line:

Rep::AuthorNotAllowed => Err(GreetInProgressError::UserCreateNotAllowed),

It should be:

Rep::AuthorNotAllowed => Err(GreetInProgressError::GreeterNotAllowed),