func GetUsersPrivilege() UsersPrivilege {
	return usersPrivilege
}
GetUsersPrivilege : The predefind set of valid privilege
package accounts
import (
	"encoding/json"
	"fmt"
	"reflect"
	"sync"
	"strings"
	"time"
	defs "github.com/ibm-security-innovation/libsecurity-go/defs"
	"github.com/ibm-security-innovation/libsecurity-go/password"
	"github.com/ibm-security-innovation/libsecurity-go/salt"
	ss "github.com/ibm-security-innovation/libsecurity-go/storage"
)
const (
	SuperUserPermission = "Super-user"
	AdminPermission = "Admin"
	UserPermission = "User"
	rootPwdExpirationDays = 3550
	pwdExpirationDays     = 90
)
var (
	usersPrivilege UsersPrivilege
	lock sync.Mutex
)
type UsersPrivilege map[string]interface{}
func (u UsersPrivilege) String() string {
	pArray := make([]string, 0, len(u))
	for p := range u {
		pArray = append(pArray, fmt.Sprintf("'%v'", p))
	}
	return strings.Join(pArray, ",")
}
type AmUserInfo struct {
	Pwd       password.UserPwd
	Privilege string
}
type Serializer struct{}
func (u AmUserInfo) String() string {
	return fmt.Sprintf("Privilege: '%v', Password: %v", u.Privilege, u.Pwd)
}
func init() {
	usersPrivilege = make(UsersPrivilege)
	usersPrivilege[UserPermission] = ""
	usersPrivilege[SuperUserPermission] = ""
	usersPrivilege[AdminPermission] = ""
	defs.Serializers[defs.AmPropertyName] = &Serializer{}
}
func NewUserAm(privilege string, pass []byte, saltData []byte, checkPwdStrength bool) (*AmUserInfo, error) {
	err := IsValidPrivilege(privilege)
	if err != nil {
		return nil, err
	}
	userPwd, err := password.NewUserPwd(pass, saltData, checkPwdStrength)
	if err != nil {
		return nil, err
	}
	return &AmUserInfo{Pwd: *userPwd, Privilege: privilege}, nil
}
func IsValidPrivilege(privilege string) error {
	_, exist := usersPrivilege[privilege]
	if !exist {
		return fmt.Errorf("The user privilege '%v' is not legal, it must be one of %v",
			privilege, usersPrivilege)
	}
	return nil
}