File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -221,4 +221,13 @@ public function viewManage(User $user, Server $server)
221221 return $ user ->permissions ()->server ($ server )->permission ('view-manage ' )->exists ();
222222 }
223223
224+ public function viewAllocation (User $ user , Server $ server )
225+ {
226+ if ($ this ->isOwner ($ user , $ server )) {
227+ return true ;
228+ }
229+
230+ return $ user ->permissions ()->server ($ server )->permission ('view-allocation ' )->exists ();
231+ }
232+
224233}
Original file line number Diff line number Diff line change 193193 <div class =" list-group" >
194194 <a href =" #" class =" list-group-item list-group-item-heading" ><strong >{{ trans (' pagination.sidebar.server_controls' ) } } </strong ></a >
195195 <a href =" /server/{{ $server -> uuidShort } } /" class =" list-group-item server-index" >{{ trans (' pagination.sidebar.overview' ) } } </a >
196- @can (' list-files' , Auth :: user () )<a href =" /server/{{ $server -> uuidShort } } /files" class =" list-group-item server-files" >{{ trans (' pagination.sidebar.files' ) } } </a >@endcan
197- @can (' view-subusers' , Auth :: user () )<a href =" /server/{{ $server -> uuidShort } } /users" class =" list-group-item server-users" >{{ trans (' pagination.sidebar.subusers' ) } } </a >@endcan
198- @can (' view-manage' , Auth :: user () )<a href =" /server/{{ $server -> uuidShort } } /settings" class =" list-group-item server-settings" >{{ trans (' pagination.sidebar.manage' ) } } </a >@endcan
196+ @can (' list-files' , $server )<a href =" /server/{{ $server -> uuidShort } } /files" class =" list-group-item server-files" >{{ trans (' pagination.sidebar.files' ) } } </a >@endcan
197+ @can (' view-subusers' , $server )<a href =" /server/{{ $server -> uuidShort } } /users" class =" list-group-item server-users" >{{ trans (' pagination.sidebar.subusers' ) } } </a >@endcan
198+ @can (' view-manage' , $server )<a href =" /server/{{ $server -> uuidShort } } /settings" class =" list-group-item server-settings" >{{ trans (' pagination.sidebar.manage' ) } } </a >@endcan
199199 </div >
200200 @endif
201201 @show
Original file line number Diff line number Diff line change 1414 <ul class =" nav nav-tabs tabs_with_panel" id =" config_tabs" >
1515 <li id =" triggerConsoleView" class =" active" ><a href =" #console" data-toggle =" tab" >{{ trans (' server.index.control' ) } } </a ></li >
1616 <li ><a href =" #stats" data-toggle =" tab" >{{ trans (' server.index.usage' ) } } </a ></li >
17- @can (' allocation' , $server )<li ><a href =" #allocation" data-toggle =" tab" >{{ trans (' server.index.allocation' ) } } </a ></li >@endcan
17+ @can (' view- allocation' , $server )<li ><a href =" #allocation" data-toggle =" tab" >{{ trans (' server.index.allocation' ) } } </a ></li >@endcan
1818 </ul >
1919 <div class =" tab-content" >
2020 <div class =" tab-pane active" id =" console" >
7878 </div >
7979 </div >
8080 </div >
81- @can (' allocation' , $server )
81+ @can (' view- allocation' , $server )
8282 <div class =" tab-pane" id =" allocation" >
8383 <div class =" panel panel-default" >
8484 <div class =" panel-heading" ></div >
@@ -384,7 +384,7 @@ function updatePlayerListVisibility(data) {
384384 }
385385 }
386386
387- @can (' set-connection ' , $server )
387+ @can (' view-allocation ' , $server )
388388 // Send Request
389389 $ (' [data-action="set-connection"]' ).click (function (event ) {
390390 event .preventDefault ();
You can’t perform that action at this time.
0 commit comments