studiocms
Version:
Astro Native CMS for AstroDB. Built from the ground up by the Astro community.
19 lines (17 loc) • 372 B
text/typescript
const getLabelForPermissionLevel = (
permissionLevel: 'admin' | 'editor' | 'owner' | 'visitor' | string
) => {
switch (permissionLevel) {
case 'admin':
return 'Administrator';
case 'editor':
return 'Editor';
case 'owner':
return 'Owner';
case 'visitor':
return 'Visitor';
default:
return 'Unknown';
}
};
export { getLabelForPermissionLevel };