Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

503 B
Raw Blame
package models

import "strings"

// OrganizationRoleFromAccountRole maps control-plane commercial/account roles to
// tenant organization roles for hosted handoff and seeded tenant metadata.
func OrganizationRoleFromAccountRole(role string) OrganizationRole {
	switch strings.ToLower(strings.TrimSpace(role)) {
	case "owner":
		return OrgRoleOwner
	case "admin":
		return OrgRoleAdmin
	case "tech":
		return OrgRoleEditor
	case "read_only":
		return OrgRoleViewer
	default:
		return OrgRoleViewer
	}
}