Question about cross-organization admin operations via application credentials
Hi, I'm evaluating Casdoor for a multi-organization setup and ran into some behavior I'd like to understand better. Not sure if this is by design or if I'm misconfiguring something.
Setup
Self-hosted Casdoor, version: v2.357.0
Created a new organization org-A (not built-in)
Created an application app-A under org-A
Got client_id / client_secret for app-A
Observed behavior
Using app-A's credentials with HTTP Basic Auth, I can perform cross-organization admin operations:
bash
Delete a different organization (org-B), using app-A's credentials
curl --location 'https://my-casdoor/api/delete-organization' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic some_base64_value' \
--data ' {
"owner": "admin",
"name": "test",
"createdTime": "2026-04-27T12:05:25+08:00",
"displayName": "test",
"websiteUrl": "https://door.casdoor.com",
...
}'
→ succeeds, org-B is deleted
I also noticed:
After deleting org-A itself using app-A's credentials, those same credentials still work and can continue operating on other organizations.
The same operation via Bearer token (obtained through client_credentials grant) is rejected with Unauthorized operation. Only Basic Auth allows it.
What I expected
Based on the docs ("client credentials give that org's admin-level access"), I assumed app-A's credentials would only have admin access scoped to org-A, not to other organizations.
My questions
Is this the intended behavior? i.e. are application credentials in Casdoor effectively global-admin-equivalent when used via Basic Auth, regardless of which organization owns the application?
If yes, is there a recommended way to scope an application's API access to its own organization only?
