use preg-checks
This commit is contained in:
		
							parent
							
								
									61dffc68ac
								
							
						
					
					
						commit
						2c991d9075
					
				| 
						 | 
					@ -87,10 +87,14 @@ class inetOrgPerson extends baseModule {
 | 
				
			||||||
				2 => array('kind' => 'help', 'value' => 'TODO'))
 | 
									2 => array('kind' => 'help', 'value' => 'TODO'))
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
		// profile checks
 | 
							// profile checks
 | 
				
			||||||
		$return['profile_checks']['inetOrgPerson_title'] = array('type' => 'regex_i', 'regex' => 'title',
 | 
							$return['profile_checks']['inetOrgPerson_title'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'title',
 | 
				
			||||||
			'error_message' => $this->messages['title'][0]);
 | 
								'error_message' => $this->messages['title'][0]);
 | 
				
			||||||
		$return['profile_checks']['inetOrgPerson_employeeType'] = array('type' => 'regex_i',
 | 
							$return['profile_checks']['inetOrgPerson_employeeType'] = array(
 | 
				
			||||||
			'regex' => 'employeeType', 'error_message' => $this->messages['employeeType'][0]);
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'employeeType',
 | 
				
			||||||
 | 
								'error_message' => $this->messages['employeeType'][0]);
 | 
				
			||||||
		// available PDF fields
 | 
							// available PDF fields
 | 
				
			||||||
		$return['PDF_fields'] = array(	'description',
 | 
							$return['PDF_fields'] = array(	'description',
 | 
				
			||||||
													'host',
 | 
																		'host',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -136,15 +136,15 @@ class sambaAccount extends baseModule {
 | 
				
			||||||
			2 => array('kind' => 'help', 'value' => 'TODO')
 | 
								2 => array('kind' => 'help', 'value' => 'TODO')
 | 
				
			||||||
			);
 | 
								);
 | 
				
			||||||
		// profile checks
 | 
							// profile checks
 | 
				
			||||||
		$return['profile_checks']['sambaAccount_smbhome'] = array('type' => 'regex_i', 'regex' => 'UNC',
 | 
							$return['profile_checks']['sambaAccount_smbhome'] = array('type' => 'ext_preg', 'regex' => 'UNC',
 | 
				
			||||||
			'error_message' => $this->messages['homePath'][0]);
 | 
								'error_message' => $this->messages['homePath'][0]);
 | 
				
			||||||
		$return['profile_checks']['sambaAccount_profilePath'] = array('type' => 'regex_i', 'regex' => 'UNC',
 | 
							$return['profile_checks']['sambaAccount_profilePath'] = array('type' => 'ext_preg', 'regex' => 'UNC',
 | 
				
			||||||
			'error_message' => $this->messages['profilePath'][0]);
 | 
								'error_message' => $this->messages['profilePath'][0]);
 | 
				
			||||||
		$return['profile_checks']['sambaAccount_scriptPath'] = array('type' => 'regex_i', 'regex' => 'logonScript',
 | 
							$return['profile_checks']['sambaAccount_scriptPath'] = array('type' => 'ext_preg', 'regex' => 'logonScript',
 | 
				
			||||||
			'error_message' => $this->messages['logonScript'][0]);
 | 
								'error_message' => $this->messages['logonScript'][0]);
 | 
				
			||||||
		$return['profile_checks']['sambaAccount_userWorkstations'] = array('type' => 'regex_i', 'regex' => 'unixhost',
 | 
							$return['profile_checks']['sambaAccount_userWorkstations'] = array('type' => 'ext_preg', 'regex' => 'unixhost',
 | 
				
			||||||
			'error_message' => $this->messages['workstations'][0]);
 | 
								'error_message' => $this->messages['workstations'][0]);
 | 
				
			||||||
		$return['profile_checks']['sambaAccount_domain'] = array('type' => 'regex_i', 'regex' => 'domainname',
 | 
							$return['profile_checks']['sambaAccount_domain'] = array('type' => 'ext_preg', 'regex' => 'domainname',
 | 
				
			||||||
			'error_message' => $this->messages['domain'][0]);
 | 
								'error_message' => $this->messages['domain'][0]);
 | 
				
			||||||
		// available PDF fields
 | 
							// available PDF fields
 | 
				
			||||||
		$return['PDF_fields'] = array(	'displayName',
 | 
							$return['PDF_fields'] = array(	'displayName',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -69,13 +69,21 @@ class sambaSamAccount extends baseModule {
 | 
				
			||||||
		// module dependencies
 | 
							// module dependencies
 | 
				
			||||||
		$return['dependencies'] = array('depends' => array('posixAccount'), 'conflicts' => array());
 | 
							$return['dependencies'] = array('depends' => array('posixAccount'), 'conflicts' => array());
 | 
				
			||||||
		// profile checks
 | 
							// profile checks
 | 
				
			||||||
		$return['profile_checks']['sambaSamAccount_smbhome'] = array('type' => 'regex_i', 'regex' => 'UNC',
 | 
							$return['profile_checks']['sambaSamAccount_smbhome'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'UNC',
 | 
				
			||||||
			'error_message' => $this->messages['homePath'][0]);
 | 
								'error_message' => $this->messages['homePath'][0]);
 | 
				
			||||||
		$return['profile_checks']['sambaSamAccount_profilePath'] = array('type' => 'regex_i', 'regex' => 'UNC',
 | 
							$return['profile_checks']['sambaSamAccount_profilePath'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'UNC',
 | 
				
			||||||
			'error_message' => $this->messages['profilePath'][0]);
 | 
								'error_message' => $this->messages['profilePath'][0]);
 | 
				
			||||||
		$return['profile_checks']['sambaSamAccount_logonScript'] = array('type' => 'regex_i', 'regex' => 'logonscript',
 | 
							$return['profile_checks']['sambaSamAccount_logonScript'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'logonscript',
 | 
				
			||||||
			'error_message' => $this->messages['logonScript'][0]);
 | 
								'error_message' => $this->messages['logonScript'][0]);
 | 
				
			||||||
		$return['profile_checks']['sambaSamAccount_userWorkstations'] = array('type' => 'regex_i', 'regex' => 'unixhost',
 | 
							$return['profile_checks']['sambaSamAccount_userWorkstations'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'unixhost',
 | 
				
			||||||
			'error_message' => $this->messages['workstations'][0]);
 | 
								'error_message' => $this->messages['workstations'][0]);
 | 
				
			||||||
		// available PDF fields
 | 
							// available PDF fields
 | 
				
			||||||
		$return['PDF_fields'] = array(	'displayName',
 | 
							$return['PDF_fields'] = array(	'displayName',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -98,15 +98,26 @@ class shadowAccount extends baseModule {
 | 
				
			||||||
				2 => array('kind' => 'help', 'value' => 'TODO'))
 | 
									2 => array('kind' => 'help', 'value' => 'TODO'))
 | 
				
			||||||
		);
 | 
							);
 | 
				
			||||||
		// profile checks
 | 
							// profile checks
 | 
				
			||||||
		$return['profile_checks']['shadowAccount_shadowMin'] = array('type' => 'regex', 'regex' => 'digit',
 | 
							$return['profile_checks']['shadowAccount_shadowMin'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'digit',
 | 
				
			||||||
			'error_message' => $this->messages['shadowMin'][0]);
 | 
								'error_message' => $this->messages['shadowMin'][0]);
 | 
				
			||||||
		$return['profile_checks']['shadowAccount_shadowMax'] = array('type' => 'regex', 'regex' => 'digit',
 | 
							$return['profile_checks']['shadowAccount_shadowMax'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'digit',
 | 
				
			||||||
			'error_message' => $this->messages['shadowMax'][0]);
 | 
								'error_message' => $this->messages['shadowMax'][0]);
 | 
				
			||||||
		$return['profile_checks']['shadowAccount_cmp'] = array('type' => 'int_greater', 'cmp_name1' => 'shadowAccount_shadowMax',
 | 
							$return['profile_checks']['shadowAccount_cmp'] = array(
 | 
				
			||||||
			'cmp_name2' => 'shadowAccount_shadowMin', 'error_message' => $this->messages['shadow_cmp'][0]);
 | 
								'type' => 'int_greater',
 | 
				
			||||||
		$return['profile_checks']['shadowAccount_shadowInactive'] = array('type' => 'regex', 'regex' => 'digit2',
 | 
								'cmp_name1' => 'shadowAccount_shadowMax',
 | 
				
			||||||
 | 
								'cmp_name2' => 'shadowAccount_shadowMin',
 | 
				
			||||||
 | 
								'error_message' => $this->messages['shadow_cmp'][0]);
 | 
				
			||||||
 | 
							$return['profile_checks']['shadowAccount_shadowInactive'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'digit2',
 | 
				
			||||||
			'error_message' => $this->messages['inactive'][0]);
 | 
								'error_message' => $this->messages['inactive'][0]);
 | 
				
			||||||
		$return['profile_checks']['shadowAccount_shadowWarning'] = array('type' => 'regex', 'regex' => 'digit',
 | 
							$return['profile_checks']['shadowAccount_shadowWarning'] = array(
 | 
				
			||||||
 | 
								'type' => 'ext_preg',
 | 
				
			||||||
 | 
								'regex' => 'digit',
 | 
				
			||||||
			'error_message' => $this->messages['shadowWarning'][0]);
 | 
								'error_message' => $this->messages['shadowWarning'][0]);
 | 
				
			||||||
		// available PDF fields
 | 
							// available PDF fields
 | 
				
			||||||
		$return['PDF_fields'] = array(	'shadowLastChange',
 | 
							$return['PDF_fields'] = array(	'shadowLastChange',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue