mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-10-31 05:36:51 +01:00 
			
		
		
		
	Fix permission check if user is subuser and admin (#720)
This commit is contained in:
		
							parent
							
								
									54039e25a4
								
							
						
					
					
						commit
						90afae79db
					
				| @ -28,8 +28,8 @@ class ServerPolicy | |||||||
| 
 | 
 | ||||||
|         $subuser = $server->subusers->where('user_id', $user->id)->first(); |         $subuser = $server->subusers->where('user_id', $user->id)->first(); | ||||||
|         // If the user is a subuser check their permissions
 |         // If the user is a subuser check their permissions
 | ||||||
|         if ($subuser) { |         if ($subuser && in_array($ability, $subuser->permissions)) { | ||||||
|             return in_array($ability, $subuser->permissions); |             return true; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // Return null to let default policies take over
 |         // Return null to let default policies take over
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Boy132
						Boy132