mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-11 18:51:31 +00:00
Import latest app updates from streamline
An updated set of source files and initialization was provided by streamline to address issues observed during initial testing. These files have been updated in order to generate a new set of app images.
This commit is contained in:
@@ -7,7 +7,10 @@ use Illuminate\Support\Carbon;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use OwenIt\Auditing\Models\Audit;
|
||||
use Spatie\Permission\Models\Role;
|
||||
use Streamline\Enums\Roles;
|
||||
use Streamline\Models\GeneralSettings;
|
||||
use Streamline\Models\PasswordSecurity;
|
||||
use Streamline\Models\SecurityQuestion;
|
||||
use Streamline\Models\StaffPositions;
|
||||
@@ -291,10 +294,10 @@ class UserController extends Controller
|
||||
$security_questions = SecurityQuestion::orderBy('name')->pluck('name', 'id');
|
||||
$security_questions->prepend('- select -', '');
|
||||
|
||||
if (Auth::user()->hasRole('Super Admin')) {
|
||||
if (Auth::user()->hasRole(Roles::SUPER_ADMIN->value)) {
|
||||
$roles = Role::pluck('name', 'name')->all();
|
||||
} else {
|
||||
$roles = Role::where('name', '!=', 'Super Admin')->pluck('name', 'name')->all();
|
||||
$roles = Role::where('name', '!=', Roles::SUPER_ADMIN->value)->pluck('name', 'name')->all();
|
||||
}
|
||||
|
||||
return view('users.create', compact('positions', 'councils', 'blood_groups', 'roles', 'security_questions'));
|
||||
@@ -369,7 +372,7 @@ class UserController extends Controller
|
||||
// $user->assignRole($request->input('roles'));
|
||||
|
||||
/*========= start catering for password expiration ========*/
|
||||
$general_settings = \Streamline\Models\GeneralSettings::find(1);
|
||||
$general_settings = GeneralSettings::find(1);
|
||||
$user_password_expiration_days = $general_settings->password_expiration_days;
|
||||
|
||||
$passwordSecurity = PasswordSecurity::create([
|
||||
@@ -421,10 +424,10 @@ class UserController extends Controller
|
||||
$security_questions->prepend('- select -', '');
|
||||
|
||||
$user = User::find($id);
|
||||
if (Auth::user()->hasRole('Super Admin')) {
|
||||
if (Auth::user()->hasRole(Roles::SUPER_ADMIN->value)) {
|
||||
$roles = Role::pluck('name', 'name')->all();
|
||||
} else {
|
||||
$roles = Role::where('name', '!=', 'Super Admin')->pluck('name', 'name')->all();
|
||||
$roles = Role::where('name', '!=', Roles::SUPER_ADMIN->value)->pluck('name', 'name')->all();
|
||||
}
|
||||
$userRole = $user->roles->pluck('name', 'name')->all();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user