BelledonneCommunications / flexisip-account-manager

A REST API, web portal and provisioning server for Flexisip
https://subscribe.linphone.org/
GNU Affero General Public License v3.0
5 stars 3 forks source link

Admin account cannot delete devices #9

Closed petervnv closed 4 months ago

petervnv commented 6 months ago

Hi,

Just updated to latest master (7418d79) and ran the migrations. I noticed that the admin account can no longer delete devices. Seems that it no longer likes the UUID and needs a different parameter now?:

For example: https://my.instance.com/admin/accounts/27/devices/urn:uuid:f79b366f-60d3-0032-b1c7-603f754bc64f/delete

throws the error about a missing parameter:

"Missing required parameter for [Route: admin.account.device.index] [URI: admin/accounts/{account}/devices] [Missing parameter: account]."

Screenshot from 2024-04-10 17-48-20

P.S. I tested logging as a non admin user and he can still delete his own devices without issues. Only the admin account seems to no longer work as expected

petervnv commented 5 months ago

Hi again,

Just to let you know I just tested again on a clean install with a fresh database and the bug is confirmed.

I also noticed another bug when attempting to create an admin account using php artisan accounts:create-admin-account

Although the account is created sucessfully (I checked in the database) it throws an error complaining about the undefined variable $apiKey (screenshot attached)

Screenshot from 2024-04-22 18-08-40

edhelas commented 4 months ago

Fixed in https://gitlab.linphone.org/BC/public/flexisip-account-manager/-/commit/3a9e62394cdc64dce6a86667cc22c9123426576a