unbridled-41 opened a new issue, #5980:
URL: https://github.com/apache/rocketmq-dashboard/issues/5980

   ### Studio Version
   branch: `rocketmq-studio` @ `7e7aa344`
   ### Runtime Environment
   Backend tests: `cd server && mvn -o -B -ntp test 
-Dtest='MybatisPlusAclRepositoryTest,AclServiceTest,AclControllerTest'`.
   ### Describe the Bug
   `admin` is optional in the documented write contract and the console's own 
model of the request preserves it (`aclService.ts`: `admin: data.admin ?? 
existing?.admin ?? false`), but the write path could not tell "not provided" 
from "explicitly false" (`boolean admin` in the DTO/VO) and always wrote it. 
Re-saving an existing admin account without naming the flag - rotating its 
secret, editing its whitelist or its permission entries - silently demoted it, 
returned `admin:false`, and dropped it out of the ACL risk view's admin count. 
The sibling user update documents the opposite rule ("Null when the admin flag 
was not part of the partial update, in which case the existing value must be 
preserved").
   ### Steps to Reproduce
   1. Have an admin plain-access account. 2. `POST 
/api/acl/plain-access-config` with `{"accessKey":"...","secretKey":"..."}` (no 
`admin`). 3. The response says `admin:false` and the stored flag is cleared.
   ### What Did You Expect to See?
   The flag preserved, as the console and the sibling endpoint do.
   ### What Did You See Instead?
   A silent privilege downgrade reported as a successful update.
   ### Impact
   An ACL state change nobody asked for, and the risk view stops flagging the 
account.
   ### Acceptance Criteria
   An omitted flag preserves the stored value for an existing account, a new 
account defaults to false, an explicit value always wins, and the write 
response carries the effective value, with regression tests.
   **Corresponding PR:** #ISSUEPR#
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to