Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2017-01-23 22:27:11 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
492e2f173e13e63bd3914ebee11c300ce9c9757b
492e2f17
1 parent
380f0f20
Fixed error causing permissions to be deleted on book sort
Closes #282
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
app/Http/Controllers/BookController.php
app/Services/PermissionService.php
app/Http/Controllers/BookController.php
View file @
492e2f1
...
...
@@ -208,7 +208,7 @@ class BookController extends Controller
}
// Update permissions on changed models
$this
->
entityRepo
->
buildJointPermissions
(
$updatedModels
);
if
(
count
(
$updatedModels
)
===
0
)
$this
->
entityRepo
->
buildJointPermissions
(
$updatedModels
);
return
redirect
(
$book
->
getUrl
());
}
...
...
app/Services/PermissionService.php
View file @
492e2f1
...
...
@@ -243,6 +243,7 @@ class PermissionService
*/
protected
function
deleteManyJointPermissionsForEntities
(
$entities
)
{
if
(
count
(
$entities
)
===
0
)
return
;
$query
=
$this
->
jointPermission
->
newQuery
();
foreach
(
$entities
as
$entity
)
{
$query
->
orWhere
(
function
(
$query
)
use
(
$entity
)
{
...
...
Please
register
or
sign in
to post a comment