Comments (7)
Hi @bastha ,
Sure, tell me what doesn't work, so I can help. Please explain what you did, what you expected to happen and what did/did not happen.
Cheers!
from permissionmanager.
from permissionmanager.
You have to handle the permissions yourself, try using middleware. If you search the backpack github issues you'll find lots of people's suggestions how :)
from permissionmanager.
from permissionmanager.
Hi @bastha ,
I personally like the recommended middleware by spatie (the ones who created the package that permissionmanager uses): https://github.com/spatie/laravel-permission#using-a-middleware
If you follow their instructions you should be able to quickly create two middleware: role and permission, that you can use in your routes file.
A faster way to create those is coming in the near-future in Backpack. This, in combination with Laravel's 5.4 release, will make it a more powerful and intuitive tool, since you'll be able to specify middleware on each route.
Cheers!
from permissionmanager.
I found that the line
if (Auth::guest()) {
return redirect($urlOfYourLoginPage);
}
doesn't really do anything, leaving it there or commenting it out doesn't have any effect. If you have not logged in, you will be directed to the login page anyway, I think Backpack takes care of redirecting guests before they enter this middleware. If you have logged in already, it won't enter the if
statement. So I think it is safe to remove the if statement completely.
from permissionmanager.
@yingdongzhang - totally agree.
@bastha , if you haven't figured this out yet, here's the code to my middlewares. Hope it helps.
Cheers!
from permissionmanager.
Related Issues (20)
- SQLSTATE[HY093]: Invalid parameter number HOT 3
- PermissionManager failing to install on backpack v6 HOT 3
- Add menu item on tabler theme HOT 12
- [Proposal] Please document how to integrate with `laravel-permission` HOT 2
- Login With LDAP HOT 2
- Users can still access the url if they have permisison HOT 2
- Permission Manager Plugin is looking for table users instead of admins HOT 9
- User list not working HOT 2
- [FEATURE] Filtering role and permissions in user CRUD HOT 2
- [Bug] Tests fail possibly trying to load filters on non-PRO setup HOT 7
- Upgrade to `spatie/laravel-permission` v6.1 HOT 5
- Why a new admin account get redirected to /home instead of /admin/dashboard? HOT 6
- How to add 'Select Role(s)' (dropdown) on user create/edit crud view (and get it to save)? HOT 2
- User edit: Default empty password behavior HOT 7
- $user->roles() returning collection of 'false' values HOT 6
- INDUSTRIAL TRAINING REPORT ON HOT 2
- The attribute [password_confirmation] either does not exist or... HOT 5
- Orderable on columns of type custom_column has not been disabled HOT 2
- Backpack error : Array to string conversion when I click preview(show) user HOT 2
- composer install: remote: Repository not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from permissionmanager.