package auth

import "strings"

var defaultPINRequiredPermissionKeys = []string{
	"audit.read",
	"easa_release.sign",
}

func DefaultPINRequiredPermissionKeys() []string {
	out := make([]string, len(defaultPINRequiredPermissionKeys))
	copy(out, defaultPINRequiredPermissionKeys)
	return out
}

func DefaultPermissionRequiresPIN(key string) bool {
	key = strings.ToLower(strings.TrimSpace(key))
	for i := range defaultPINRequiredPermissionKeys {
		if defaultPINRequiredPermissionKeys[i] == key {
			return true
		}
	}
	return false
}
