updated developer access role

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

@ -33,6 +33,14 @@ class UserController extends XController
public function save($user, $request) 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->name = $request->input('name');
$user->email = $request->input('email'); $user->email = $request->input('email');
if (trim($request->input('password')) != '') { if (trim($request->input('password')) != '') {

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

Loading…
Cancel
Save