Handle nil restricted visibility settings
Return `true` from `non_restricted_level?` when the `restricted_visibility_levels` setting is nil.
This commit is contained in:
		
							parent
							
								
									0eaabc2708
								
							
						
					
					
						commit
						e535d21768
					
				| 
						 | 
				
			
			@ -35,8 +35,12 @@ module Gitlab
 | 
			
		|||
      end
 | 
			
		||||
 | 
			
		||||
      def non_restricted_level?(level)
 | 
			
		||||
        if current_application_settings.restricted_visibility_levels.nil?
 | 
			
		||||
          true
 | 
			
		||||
        else
 | 
			
		||||
          ! current_application_settings.restricted_visibility_levels.include?(level)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      def valid_level?(level)
 | 
			
		||||
        options.has_value?(level)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue