rappasoft / vault Goto Github PK
View Code? Open in Web Editor NEWRoles & Permissions for the Laravel 5 Framework
License: MIT License
Roles & Permissions for the Laravel 5 Framework
License: MIT License
I get the following exception when trying to implement Vault!!
ErrorException in RouteNeedsRole.php line 22:
Non-static method App\Models\Vault::hasRoles() should not be called statically, assuming $this from incompatible context
To understand i did not install your package i copied some of the classes because I don't need all of your views and stuff.
Thanks
Hi i installed this packages..
if User login as a staff he can only see uers List .. Staff can't do edit update or delete and can't see other pages how can i do that..
Vault update "deleted_at" field on logout action. This deletes my user and need to "null" the field again to log in.
I'm using a fresh laravel 5 install with vault, followed the setup and navigating to /access/users throws a Query Builder exception:
Next exception 'ErrorException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel_testbed.user_vault_permission' doesn't exist (SQL: select count(*) as aggregate from `permissions` inner join `user_vault_permission` on `permissions`.`id` = `user_vault_permission`.`permission_id` where `user_vault_permission`.`user_id` = 1) (View: /home/vagrant/Code/l5/resources/views/vendor/vault/index.blade.php)' in /home/vagrant/Code/l5/vendor/laravel/framework/src/Illuminate/Database/Connection.php:614
EDIT: After quick investigation the vault.permission_user_table Schema from migrations.stub is not getting copied over to the migration file. As well neither is the configuration option in the config file.
I have this example
Route::group([
'middleware' => 'vault.routeNeedsRole',
'role' => ['Administrator','Test1'],
'redirect' => 'not-autorized',
'with' => ['error', 'You do not have access to do that.']
], function()
{
Route::get('example', 'testController@test');
}
I want this : if user go to "site.com/example" and he is not logged in, show login form. After login, redirect to the resource requested by user
site.com/example ---> loginform ----> site.com/example
second example
site.com/example/54/edit ---->loginform --->site.com/example/54/edit
how we can do this?
Hi,
Would it be possible to upgrade this package to work on Laravel 5.1? I guess your custom access package on laravel-5-boilerplate is supported L5.1 now. Thank you!
You need to update the docs to include adding:
'Illuminate\Html\HtmlServiceProvider',
to the providers
and
'Form' => 'Illuminate\Html\FormFacade', 'HTML' => 'Illuminate\Html\HtmlFacade'
to the aliases
Getting the following error.
php artisan db:seed --class="VaultTableSeeder"
[Illuminate\Database\QueryException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.deleted_at' in 'where clause' (SQL: select * from `users` where `users`.`deleted_at` is null limit 1)
[PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.deleted_at' in 'where clause'
Do I need to add deleted_at
into the users table?
Thanks
dev-master doesnt work with 5.0.*. And we can not update our project to 5.1 yet. How can we do?
access/users url redirecting to dashboard. i used laravel-5-boilerplate and vault package, i didn't found any errors at time of installation but am unable access admin part, all Role and Permissions of Controllers and Middleware files are at Vendor only
How do i change the password so its not just alpha numeric? i also want to allow special characters
Hi Anthony.. Can you add support to add custom layout?.. It is too hard??..
We can use or not use the vault views... but, what if we want to use your vault views with some extra features or design...
Sorry for my english... thanks.
pS. this is not an issue, this is an enhancement request.
In the end of the seeds.stub, there is this snippet:
$user_model = Config::get('auth.model');
$user = $user_model::find(2);
$user->permissions()->sync(
[
$userOnlyPermission->id,
]
);
I think it should instead look like this, judging from how the admin role permissions is setup earlier:
$user_model = Config::get('vault.role');
$user = $user_model::find(2);
$user->permissions()->sync(
[
$userOnlyPermission->id,
]
);
for the recent udpate ... i've theses error :
Conclusion: don't install illuminate/support v5.1.25
and
don't install illuminate/support v5.1.1|don't install laravel/framework v5.2.*
Some update for the futur ?
Can you show me a way to implement roles such as Group Admin, Group Moderator, Page Admin, Page Content Admin etc. so that I can use like this @ROLE('group_admin') in blade template ? There will be multiple groups/pages , and the role need to be specific to individual group/page.
Hello,
I try to use this package and... it is good! very nice!
i found i little problem when i'm in the "site.app:8000/access/users/create".
I fill the fields and press "Save". The sistem create new user correctly, but then, i rest in the same page
and i see this error "Invalid argument supplied for foreach()".
Can you help me?
Other information : the "version" of my installation is "Installing rappasoft/vault (dev-master 7bf215c)" (readed during "composer update" command)
Hello Anthony,
I am building an app on top of you laravel 5 boilerplate and vault. I noticed you have a mention of blade extensions which I would very much like to use. Unfortunately I have trouble installing the suggested radic/blade-extensions. Below are my composer update conflicts. How did you get that to work?
Thanks,
Peter
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: remove laravel/framework v5.0.2
- Installation request for radic/blade-extensions 1.2 -> satisfiable by radic/blade-extensions[v1.2.0].
- Conclusion: don't install laravel/framework v5.0.2
- Conclusion: don't install laravel/framework v5.0.1
- radic/blade-extensions v1.2.0 requires illuminate/support 4.* -> satisfiable by illuminate/support[v4.0.0, v4.0.1, v4.0.10, v4.0.2, v4.0.3, v4.0.4, v4.0.5, v4.0.6, v4.0.7, v4.0.8, v4.0.9, v4.1.0, v4.1.1, v4.1.10, v4.1.11, v4.1.12, v4.1.13, v4.1.14, v4.1.15, v4.1.16, v4.1.17, v4.1.18, v4.1.19, v4.1.2, v4.1.20, v4.1.21, v4.1.22, v4.1.23, v4.1.24, v4.1.25, v4.1.26, v4.1.27, v4.1.28, v4.1.29, v4.1.3, v4.1.30, v4.1.4, v4.1.5, v4.1.6, v4.1.7, v4.1.8, v4.1.9, v4.2.1, v4.2.12, v4.2.16, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
- don't install illuminate/support v4.0.0|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.1|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.10|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.2|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.3|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.4|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.5|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.6|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.7|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.8|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.0.9|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.0|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.1|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.10|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.11|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.12|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.13|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.14|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.15|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.16|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.17|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.18|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.19|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.2|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.20|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.21|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.22|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.23|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.24|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.25|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.26|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.27|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.28|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.29|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.3|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.30|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.4|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.5|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.6|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.7|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.8|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.1.9|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.1|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.12|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.16|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.2|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.3|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.4|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.5|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.6|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.7|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.8|don't install laravel/framework v5.0.0
- don't install illuminate/support v4.2.9|don't install laravel/framework v5.0.0
- Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[v5.0.0, v5.0.1, v5.0.2].
Hi,
I'm having trouble that the deleted_at and the remember_token is set on the user model each time i logout from the system so that when i try to login the authentication fails due to deleted_at is not null anymore.
Anyone else bumped into this problem?
Hi,
While trying out the package I noticed that while creating a new permission, I was unable to deselect the Administrator Role.
Shailesh
Hello, following setup instructions i hit this:
exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.deleted_at' in 'where clause'' in /home/vagrant/dev/l5-kvarnia/l5/vendor/laravel/framework/src/Illuminate/Database/Connection.php:288
Should be straigtforward to fix, by adding to my users table migration:
$table->timestamp('deleted_at');
However, it could possibly be mentioned in the readme, or taken care of by the migrations this package creates?
/m
Hi,
We're using your package and it is great.
It saves us a lot of time, but we have one problem with it.
We're using some different field. Instead of having a name field we're have multiple fields for firstname and lastname.
Your validation file (vendor/rappasoft/vault/src/Vault/Services/Validators/Rules/Auth/User/Create.php) requires the name field which we don't have.
I would like to know how we could overwrite this in our software.
Best regards,
Jurgen
Keep up the good work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.