Comments (9)
This is fixed in the upcoming 5.1 release. But you can fix it by going to EloquentRoleRepository.php to the update method and replacing it with this:
public function update($id, $input, $permissions) {
$role = $this->findOrThrowException($id);
//Validate
if (strlen($input['name']) == 0)
throw new GeneralException('You must specify the role name.');
//See if the role must contain a permission as per config
if (config('access.roles.role_must_contain_permission') && count($permissions['role_permissions']) == 0)
throw new GeneralException('You must select at least one permission for this role.');
$role->name = $input['name'];
if ($role->save()) {
//Remove all permissions
$role->detachPermissions($role->permissions);
//Attach permissions, if any
if (count($permissions['role_permissions']) > 0)
$role->attachPermissions($permissions['role_permissions']);
return true;
}
throw new GeneralException('There was a problem updating this role. Please try again.');
}
from laravel-boilerplate.
Delete that role and clear the permissions from it in the database as well to make sure its working properly.
from laravel-boilerplate.
Yes , it works perfect now, thank you.
from laravel-boilerplate.
No problem sorry meant to make a hotfix but was in the middle of the 5.1 conversion and didn't want to lose track of where I was.
from laravel-boilerplate.
Weird, it could be something to do with the way firefox handles sessions.
from laravel-boilerplate.
Though Laravel has been known to have Token exceptions on rapid refresh, just like on multiple AJAX calls at the same time. I don't know if there is a solution. But why are you refreshing several times on the dashboard?
from laravel-boilerplate.
Another fatal problem to me, it seems with Firefox form submit fails more often than never.
from laravel-boilerplate.
I removed 'App\Http\Middleware\VerifyCsrfToken' middleware, it still broken.
Sorry for the OT above.
Why not use Role::savePermissions for patch of this issue?
from laravel-boilerplate.
Good question, that's a better solution. Good call, i'll commit it.
from laravel-boilerplate.
Related Issues (20)
- I cant send emails to a specific mail.... the mail is going to the smtp website... HOT 1
- Demo asking for password update HOT 2
- Default pages HOT 1
- /lang route will break the session if wrong... HOT 2
- Contact form gcaptcha wrong validate: v6.x HOT 2
- [JS Console Warning] AlphineJS loaded before Livewire scripts. HOT 8
- [Question] Automate generation of localization JSON data(__, @lang in template/classes) HOT 3
- Need to update from Laravel 6 BoilerPlate to Laravel 8 or 9 HOT 2
- I need to disable 2 step authentication HOT 2
- Password expiration middleware to exclude social logins HOT 3
- Argument 1 passed to Illuminate\Session\Middleware\StartSession::addCookieToResponse() must be an instance of Symfony\Component\HttpFoundation\Response, null given, called in /var/www/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php on line 63 {"exception":"[object] (Symfony\\Component\Debug\\Exception\\FatalThrowableError(code:0) HOT 1
- support laravel9? HOT 13
- Can't access the Demo server HOT 1
- Deactivated user can login by requesting password reset HOT 12
- Composer Install Package Issue HOT 2
- I got this error how to solve HOT 1
- Conflict in backend.js causing nav anchor tag to not append to URL HOT 3
- 2FA isn't working HOT 2
- Failed asserting HOT 2
- Demo is broken - Password reset required 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 laravel-boilerplate.