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 to check active users permissions? #42

Closed
dvdkrgr opened this issue Apr 9, 2015 · 1 comment
Closed

How to check active users permissions? #42

dvdkrgr opened this issue Apr 9, 2015 · 1 comment

Comments

@dvdkrgr
Copy link
Contributor

dvdkrgr commented Apr 9, 2015

Hey there i'ts ne again 😃 ,
i've tried a few things now but i haven't figured out how to check users permission yet.

I've seen this code snippet on your Readme:

User::hasRole($roles, $superAdminAllowed = true)

But I can't figure out where to use this. I've tried using it on a view and if the permissions were not given i want to throw an exception. It shows me "Class user not found"? Can you give me a sample code or a hint what i am missing?

@dvdkrgr
Copy link
Contributor Author

dvdkrgr commented Apr 9, 2015

Damn it, i'm really good opening issues and find the solution directly after it. Forgot this line in my view:

use webvimark\modules\UserManagement\models\User;

I was just looking for UserManagementModule

@dvdkrgr dvdkrgr closed this as completed Apr 9, 2015
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

1 participant