Allow groups to be seen by all users
This commit is contained in:
parent
bbf2168a31
commit
dc0efd2d91
1 changed files with 4 additions and 4 deletions
|
|
@ -257,8 +257,8 @@ class BaseController extends Controller
|
|||
'company.groups' => function ($query) use ($updated_at, $user) {
|
||||
$query->where('updated_at', '>=', $updated_at)->with('documents');
|
||||
|
||||
if(!$user->isAdmin())
|
||||
$query->where('group_settings.user_id', $user->id);
|
||||
// if(!$user->isAdmin())
|
||||
// $query->where('group_settings.user_id', $user->id);
|
||||
},
|
||||
'company.invoices'=> function ($query) use ($updated_at, $user) {
|
||||
$query->where('updated_at', '>=', $updated_at)->with('invitations', 'documents');
|
||||
|
|
@ -499,8 +499,8 @@ class BaseController extends Controller
|
|||
'company.groups' => function ($query) use ($created_at, $user) {
|
||||
$query->where('created_at', '>=', $created_at)->with('documents');
|
||||
|
||||
if(!$user->isAdmin())
|
||||
$query->where('group_settings.user_id', $user->id);
|
||||
// if(!$user->isAdmin())
|
||||
// $query->where('group_settings.user_id', $user->id);
|
||||
},
|
||||
'company.invoices'=> function ($query) use ($created_at, $user) {
|
||||
$query->where('created_at', '>=', $created_at)->with('invitations', 'documents');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue