thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.77k stars 2.67k forks source link

Roles - Different types of Admin #1723

Closed rexdarel closed 6 years ago

rexdarel commented 6 years ago

Description:

This might not be an issue but I just want you to enlighten me. I created a new role "Admin Assistant".... I want this role to do BREAD on the Users table except to the "Admin" role... How to do this? Is this possible? Btw, I'm waiting for the release of v 1 this Sept 18. Thank you

Steps To Reproduce:

rexdarel commented 6 years ago

I realize that it is completely possible to do this but I need steps if there are any. I don't want to mess my project.

davodavodavo3 commented 6 years ago

I thin you need to create your own controller that extends voyager and do check for that Role(Admin Assistant) and prevent actions to Admin role

fletch3555 commented 6 years ago

Depends what you want the role to be able to do. Odds are you can simply override the view and add logic there. Even better would be to make use of the new auth system in 1.0 (with Policies)

lancepioch commented 6 years ago

Labels: question, enhancement

marktopper commented 6 years ago

This can be done using Policies in v1.0 as @fletch3555 said. I created a short guide on how to use the Policies in Voyager. https://webman.io/blog/post/using-policies-in-laravel-voyager

rexdarel commented 6 years ago

Wow thank you!

ghost commented 5 years ago

Hi #rexdarel I want to implement the same you asked for, can you please help me what steps you followed?

fletch3555 commented 5 years ago

@prashantUpstur, please don't comment on closed issues, especially ones that are 18 months old and for a much older version