Skip to content

[BUG] Only user with name "admin" can use API despite being able to enable API access to other users that have admin role #1426

Open
@aeroboy86

Description

@aeroboy86

Panel / Server Versions
Current Version: 2.3
Build: 9
Current Commit: 33cc6ba
OS: Ubuntu 22.04LTS

Issue
Currently only a user with the title "admin" can actually use the cloudAPI. This does not make sense as CP allows you to enable API access for other users not called "admin". When you attempt to use the API with a different user that has been selected to have API access and the relevant ACL the status response is:

{"status": 0, "error_message": "Only administrator can access API."}

Believed issue location
cloudAPI/views.py --> router() line 21-23

Expected behavior
If the tool allows you to create multiple users and also enable API Access for that user, then they should be granted access to send requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions