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

[AdminUI] Roles should require at least one channel to be selected #2760

Open
halykon opened this issue Mar 28, 2024 · 0 comments
Open

[AdminUI] Roles should require at least one channel to be selected #2760

halykon opened this issue Mar 28, 2024 · 0 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@halykon
Copy link

halykon commented Mar 28, 2024

Describe the bug
When creating a role in the Admin UI, the channel for the permissions can be empty. If no channel is selected, no permissions will be applied, therefore all @Allow() auth guards will deny access, even if the role has the correct permission

To Reproduce
Steps to reproduce the behavior:

  1. Open the Admin UI
  2. Click on Settings > Roles
  3. Check the Channel input, it is allowed to be empty.
  4. Create a role without a channel, assign it the correct permissions and to a user
  5. Try to access a protected Query

Expected behavior
The channel selection input should not allow empty values and the Admin API might want to require the channel as well. That would prevent an empty channel to be set, therefore, permissions will always work as expected

Environment (please complete the following information):

  • @vendure/core version: 2.1.8
  • Nodejs version: v18.19.1
  • Database (mysql/postgres etc): postgres
@halykon halykon added the type: bug 🐛 Something isn't working label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants