Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

root account add data permissions occur "rolesResourcesScopes:create 403 (Forbidden)" #4592

Closed
ruanjf opened this issue Jun 7, 2024 · 4 comments

Comments

@ruanjf
Copy link

ruanjf commented Jun 7, 2024

* Describe the bug

root account add data permissions occur "rolesResourcesScopes:create 403 (Forbidden)"

* Environment

  • NocoBase version: v1.0.0-alpha.17
  • Database type and version: MySQL 8.3.0
  • OS: MacOS
  • Deployment Methods: Git source code
  • Docker image version:
  • NodeJS version: v18.16.0

* How To Reproduce

http://localhost:13000/admin/settings/users-permissions/roles
image
image
image

Expected behavior

Screenshots

Logs

2024-06-07 11:14:03 [info]  request GET /api/dataSources/main/rolesResourcesScopes:list?pageSize=20&filter=%7B%22%24or%22%3A%5B%7B%22resourceName%22%3A%22ansibleJobLogs%22%7D%2C%7B%22resourceName%22%3Anull%7D%5D%7D method=GET path=/api/dataSources/main/rolesResourcesScopes:list?pageSize=20&filter=%7B%22%24or%22%3A%5B%7B%22resourceName%22%3A%22ansibleJobLogs%22%7D%2C%7B%22resourceName%22%3Anull%7D%5D%7D req={"header":{"x-role":"admin","x-hostname":"localhost","x-timezone":"+08:00","x-locale":"zh-CN","x-authenticator":"basic"}} app=main reqId=14366fa9-3356-4757-bdb4-9b09816cbd2b
2024-06-07 11:14:03 [debug] ctx permission                               meta={"can":null,"resourceName":"dataSourcesRolesResourcesScopes","actionName":"list"} module=dataSources/main/rolesResourcesScopes submodule=list app=main reqId=14366fa9-3356-4757-bdb4-9b09816cbd2b dataSourceKey=main
2024-06-07 11:14:03 [error] No permissions                               meta={"err":"ForbiddenError: No permissions\n    at Object.throw (/Users/rjf/git/nocobase/node_modules/koa/lib/context.js:97:11)\n    at middlewares.add.tag (/Users/rjf/git/nocobase/packages/core/acl/src/acl.ts:440:15)\n    at dispatch (/Users/rjf/git/nocobase/node_modules/koa-compose/index.js:42:32)\n    at <anonymous> (/Users/rjf/git/nocobase/packages/core/acl/src/allow-manager.ts:108:13)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at ACLMiddleware (/Users/rjf/git/nocobase/packages/core/acl/src/acl.ts:365:14)\n    at setCurrentRole (/Users/rjf/git/nocobase/packages/plugins/@nocobase/plugin-acl/src/server/middlewares/setCurrentRole.ts:67:3)\n    at <anonymous> (/Users/rjf/git/nocobase/packages/core/auth/src/auth-manager.ts:131:7)\n    at validateFilterParams (/Users/rjf/git/nocobase/packages/core/server/src/middlewares/validate-filter-params.ts:20:3)\n    at <anonymous> (/Users/rjf/git/nocobase/packages/plugins/@nocobase/plugin-field-china-region/src/server/index.ts:38:9)"} module=dataSources/main/rolesResourcesScopes submodule=list method=error-handler app=main reqId=14366fa9-3356-4757-bdb4-9b09816cbd2b dataSourceKey=main

@hongboji
Copy link
Contributor

In the upper right corner of the system, to see which role is being used by the logged-in user and the specific permission settings for that role, you can take a screenshot of both

@ruanjf
Copy link
Author

ruanjf commented Jun 11, 2024

image

@hongboji
Copy link
Contributor

How to configure data sources in admin role?

@chareice
Copy link
Contributor

You can try again with the latest version, and if there are any issues, please reopen this issue or open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants