15 lines
		
	
	
		
			364 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
		
		
			
		
	
	
			15 lines
		
	
	
		
			364 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
|   | module Validators | ||
|  |   class Helpers::Users < Base | ||
|  | 
 | ||
|  |     def valid? | ||
|  |       mongo_users = ::Devops::Db.connector.users_names(@model) | ||
|  |       @nonexistent_users = @model - mongo_users | ||
|  |       @nonexistent_users.empty? | ||
|  |     end | ||
|  | 
 | ||
|  |     def message | ||
|  |       Devops::Messages.t("project.deploy_env.validation.users.not_exist", users: @nonexistent_users.join("', '")) | ||
|  |     end | ||
|  |   end | ||
|  | end |