UNPKG

@fleetbase/ember-core

Version:

Provides all the core services, decorators and utilities for building a Fleetbase extension for the Console.

8 lines (6 loc) 269 B
import getModelName from './get-model-name'; export default function getModelSavePermission(service, model) { const modelName = getModelName(model); const ability = model && model.isNew ? 'create' : 'update'; return `${service} ${ability} ${modelName}`; }