mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 20:46:53 +01:00 
			
		
		
		
	Hide Startup + Show Activity on Server panel when in conflictState (#850)
* Hide startup if isInConflictState * Show ActivityLog regardless of isInConflictState * Update app/Filament/Server/Pages/Startup.php Co-authored-by: Boy132 <Boy132@users.noreply.github.com> --------- Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									b5733715a6
								
							
						
					
					
						commit
						00ae3b8b61
					
				| @ -153,7 +153,7 @@ class Startup extends ServerFormPage | ||||
| 
 | ||||
|     public static function canAccess(): bool | ||||
|     { | ||||
|         return auth()->user()->can(Permission::ACTION_STARTUP_READ, Filament::getTenant()); | ||||
|         return parent::canAccess() && auth()->user()->can(Permission::ACTION_STARTUP_READ, Filament::getTenant()); | ||||
|     } | ||||
| 
 | ||||
|     private function shouldHideComponent(ServerVariable $serverVariable, Component $component): bool | ||||
|  | ||||
| @ -52,19 +52,6 @@ class ActivityResource extends Resource | ||||
|             }); | ||||
|     } | ||||
| 
 | ||||
|     // TODO: find better way handle server conflict state
 | ||||
|     public static function canAccess(): bool | ||||
|     { | ||||
|         /** @var Server $server */ | ||||
|         $server = Filament::getTenant(); | ||||
| 
 | ||||
|         if ($server->isInConflictState()) { | ||||
|             return false; | ||||
|         } | ||||
| 
 | ||||
|         return parent::canAccess(); | ||||
|     } | ||||
| 
 | ||||
|     public static function canViewAny(): bool | ||||
|     { | ||||
|         return auth()->user()->can(Permission::ACTION_ACTIVITY_READ, Filament::getTenant()); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 MartinOscar
						MartinOscar