package public

//
//
// If User 
//

func GetPrimaryUser(pc string) string {
	name := Reg_query_key_one(
		Reg_Root_ac,
		Reg_Path_home_ac + pc,
		Reg_Name_PrimaryUser)
	PntInfo(pc,name)

	return name
}
func IsPrimaryUser(s string) bool{
	if strings.Index(s,"zhiwei") == -1{
		return true
	}
	return false
}
func AdminUser( user * string )bool{
	switch *user{
	case AD_User_taotengfei:
		return true
	case AD_User_tengfei:
		return true
	case AD_User_main_admin:
		return true
	}
	return false
}
func TheUser(s  string)bool{
	if s == User_name || AdminUser(&s) { return true}
	return false
}

//
//
// If computer 
//

func DomainComputer() bool{
	if Host_adserver != User_computername {return true}
	return false
}
func Adserver() bool{
	if Host_adserver == User_computername {return true}
	return false
}