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

How Authorize Works in Voyager and add Custom Roles? #5838

Open
blpraveen opened this issue Feb 10, 2024 · 1 comment
Open

How Authorize Works in Voyager and add Custom Roles? #5838

blpraveen opened this issue Feb 10, 2024 · 1 comment
Labels

Comments

@blpraveen
Copy link

Laravel version

Laravel 9

PHP version

Php version 8

Voyager version

1.4.3

Description of problem

I have customer roles and permission like admin, organizer and customer.

How can add own menu items and data types to organizer and customer?

Proposed solution

Show be able add new roles and own menu and data types . Restrict data by logged in user.

Alternatives considered

No response

Additional context

No response

@Emerica
Copy link
Contributor

Emerica commented Feb 10, 2024

If I understand right, you might be confused about permissions/roles.
Maybe you meant to say you have roles, "admin, organizer and customer"

Each of those roles can have different permissions for each model. (browse, read, edit, add, delete)
You can set these permissions in each role.

The side menu and associated views/actions will only show/work when the authenticated user has a role with browse permissions for the associated model.

See: https://github.com/thedevdojo/voyager/blob/1.6/docs/core-concepts/roles-and-permissions.md

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

No branches or pull requests

2 participants