mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 20:01:07 +03:30
fix
This commit is contained in:
@@ -2,25 +2,13 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HomeController extends Controller
|
||||
{
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('home');
|
||||
|
||||
@@ -153,5 +153,4 @@ class LabelController extends Controller
|
||||
'package' , 'package.items' ] );
|
||||
return MessageResponse::data( $Label );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ use Packages\Messaging\src\Facades\MessageResponse;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
|
||||
public function index( Request $request )
|
||||
{
|
||||
$user = auth( 'api' )->user();
|
||||
@@ -185,5 +184,4 @@ class UserController extends Controller
|
||||
->get();
|
||||
return MessageResponse::data( $users );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,11 +21,11 @@ class TransferPolicy
|
||||
return true;
|
||||
} else {
|
||||
if ( $User->hasRole( 'Supervisor' ) ) {
|
||||
if ( $Item->user->medical_center_id == $User->medical_center_id && $Item->package_id == null ) {
|
||||
if ( $Item->user->medical_center_id == $User->medical_center_id ) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if ( $Item->user_id == $User->id && $Item->package_id == null ) {
|
||||
if ( $Item->user_id == $User->id ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user