[GH-ISSUE #6260] [Feature]: Admin Panel #4249

Closed
opened 2026-10-31 20:38:17 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @stiiluyyu on GitHub (Aug 19, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6260

Add the option to provide an admin panel with access levels lower than that of a super admin.

Describe the solution you'd like

You can draw inspiration from Whalpanel or HMPanel for this.

Alternatives you've considered

No response

Concrete use case

No response

Mockups, screenshots, or examples

No response

Which parts of the panel would this affect?

No response

Are you willing to help?

  • I'd like to implement this feature myself and open a PR.
  • I can help test once a PR is open.

Before submitting

  • I searched existing issues and this feature has not been requested.
  • This feature request is written in English.
Originally created by @stiiluyyu on GitHub (Aug 19, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/6260 ### Is your feature request related to a problem? Add the option to provide an admin panel with access levels lower than that of a super admin. ### Describe the solution you'd like You can draw inspiration from Whalpanel or HMPanel for this. ### Alternatives you've considered _No response_ ### Concrete use case _No response_ ### Mockups, screenshots, or examples _No response_ ### Which parts of the panel would this affect? _No response_ ### Are you willing to help? - [x] I'd like to implement this feature myself and open a PR. - [x] I can help test once a PR is open. ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this feature has not been requested. - [x] This feature request is written in English.
bsakaguchi 2026-10-31 20:38:17 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 19, 2026):

This is the same request as #4377 ("Multi-Admin Accounts with Basic Role Permissions"): additional panel accounts whose permissions are narrower than the single full-access admin. #5042 was closed against #4377 for the same reason. #4377 was closed as not planned on 2026-05-14, so demand tracking and discussion belong there.

What the code has today, for reference:

  • The panel account has no role or permission field. model.User in internal/database/model/model.go (line 37) carries only Id, Username, Password and LoginEpoch.
  • There is no endpoint that creates a second panel account. POST /panel/api/setting/updateUser (internal/web/controller/setting.go, line 71) only changes the current user's username and password, and API authentication resolves the account through GetFirstUser() (internal/web/service/panel/user.go, line 25).
  • The only permission split that exists is on API tokens, not on logins: the scopes admin, monitor and node-sync (internal/database/model/model.go, line 159), enforced by enforceTokenScope in internal/web/controller/api.go. A monitor token is read-only and restricted to the status/metrics routes listed in monitorScopeAllow (internal/web/controller/api.go, line 74). That covers a read-only dashboard or bot, but it is a REST credential, not a second panel login with a restricted UI.

You indicated you would like to implement this yourself. Since role-based access control touches the user model, session handling and every mutating controller, and since #4377 was already declined, it is worth agreeing on the scope with the maintainer on #4377 before writing code.

Closing here as a duplicate of #4377. Please add your specifics there, in particular which capabilities a lower-level admin should keep and which it must not have.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:5337039313 --> @github-actions[bot] commented on GitHub (Aug 19, 2026): This is the same request as #4377 ("Multi-Admin Accounts with Basic Role Permissions"): additional panel accounts whose permissions are narrower than the single full-access admin. #5042 was closed against #4377 for the same reason. #4377 was closed as not planned on 2026-05-14, so demand tracking and discussion belong there. What the code has today, for reference: - The panel account has no role or permission field. `model.User` in `internal/database/model/model.go` (line 37) carries only `Id`, `Username`, `Password` and `LoginEpoch`. - There is no endpoint that creates a second panel account. `POST /panel/api/setting/updateUser` (`internal/web/controller/setting.go`, line 71) only changes the current user's username and password, and API authentication resolves the account through `GetFirstUser()` (`internal/web/service/panel/user.go`, line 25). - The only permission split that exists is on API tokens, not on logins: the scopes `admin`, `monitor` and `node-sync` (`internal/database/model/model.go`, line 159), enforced by `enforceTokenScope` in `internal/web/controller/api.go`. A `monitor` token is read-only and restricted to the status/metrics routes listed in `monitorScopeAllow` (`internal/web/controller/api.go`, line 74). That covers a read-only dashboard or bot, but it is a REST credential, not a second panel login with a restricted UI. You indicated you would like to implement this yourself. Since role-based access control touches the user model, session handling and every mutating controller, and since #4377 was already declined, it is worth agreeing on the scope with the maintainer on #4377 before writing code. Closing here as a duplicate of #4377. Please add your specifics there, in particular which capabilities a lower-level admin should keep and which it must not have. *This reply was generated automatically; a maintainer may follow up.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#4249
No description provided.