updated developer access role

pull/49/head
A1Gard 3 months ago
parent b602fdb140
commit 0a48fd16df

@ -33,6 +33,14 @@ class UserController extends XController
public function save($user, $request)
{
if ($user->role == 'DEVELOPER' && !auth()->user()->hasRole('DEVELOPER')) {
abort(403);
}
if (!auth()->user()->hasRole('DEVELOPER') && $request->role == 'DEVELOPER') {
abort(403);
}
$user->name = $request->input('name');
$user->email = $request->input('email');
if (trim($request->input('password')) != '') {

@ -175,7 +175,7 @@
</li>
@endif
@if( auth()->user()->hasAnyAccess( 'gfx' ))
@if( auth()->user()->hasRole('DEVELOPER') )
<li>
<a href="{{route('admin.gfx.index')}}">
<i class="ri-color-filter-line"></i>
@ -183,7 +183,7 @@
</a>
</li>
@endif
@if( auth()->user()->hasAnyAccess( 'area' ))
@if( auth()->user()->hasRole('DEVELOPER') )
<li>
<a href="{{route('admin.area.index')}}">
<i class="ri-paint-brush-line"></i>

Loading…
Cancel
Save