Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

343 B
Raw Blame
import { PERMISSION_ACTIONS } from '@/const/rbac';

export const getResourceType = (permissionKey: keyof typeof PERMISSION_ACTIONS) => {
  return PERMISSION_ACTIONS[permissionKey].split(':')[0];
};

export const getActionType = (permissionKey: keyof typeof PERMISSION_ACTIONS) => {
  return PERMISSION_ACTIONS[permissionKey].split(':')[1];
};