umbraco-current-user-action
Implement current user actions in Umbraco backoffice using official docs
What this skill does
# Umbraco Current User Action
## What is it?
Current User Actions appear in the user menu (accessed by clicking the user avatar in the top-right corner of the backoffice). They provide quick actions for the currently logged-in user, such as profile settings, preferences, or custom functionality. Actions can execute code or navigate to a URL.
## Documentation
Always fetch the latest docs before implementing:
- **Extension Types**: https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types
- **Foundation**: https://docs.umbraco.com/umbraco-cms/customizing/foundation
- **Extension Registry**: https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-registry
## Related Foundation Skills
- **Conditions**: For controlling when actions appear
- Reference skill: `umbraco-conditions`
- **Modals**: When actions open modal dialogs
- Reference skill: `umbraco-modals`
## Workflow
1. **Fetch docs** - Use WebFetch on the URLs above
2. **Ask questions** - What action? Navigate or execute? Conditions needed?
3. **Generate files** - Create manifest + action class based on latest docs
4. **Explain** - Show what was created and how to test
## Minimal Examples
### Manifest with Default Kind (manifests.ts)
```typescript
import type { ManifestCurrentUserActionDefaultKind } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestCurrentUserActionDefaultKind = {
type: 'currentUserAction',
kind: 'default',
alias: 'My.CurrentUserAction.Preferences',
name: 'User Preferences',
api: () => import('./preferences-action.js'),
meta: {
icon: 'icon-settings',
label: 'My Preferences',
},
};
export const manifests = [manifest];
```
### Action Implementation (preferences-action.ts)
```typescript
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
import type { UmbCurrentUserAction } from '@umbraco-cms/backoffice/current-user';
export class PreferencesAction extends UmbControllerBase implements UmbCurrentUserAction {
async getHref(): Promise<string | undefined> {
// Return undefined to use execute() instead
return undefined;
}
async execute(): Promise<void> {
// Perform the action
console.log('Opening preferences...');
}
}
export default PreferencesAction;
```
### Link-based Action
```typescript
export class ExternalLinkAction extends UmbControllerBase implements UmbCurrentUserAction {
async getHref(): Promise<string | undefined> {
return 'https://docs.umbraco.com';
}
async execute(): Promise<void> {
// Not called when getHref returns a value
}
}
```
### Action Opening Modal
```typescript
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api';
import { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';
import type { UmbCurrentUserAction } from '@umbraco-cms/backoffice/current-user';
export class SettingsAction extends UmbControllerBase implements UmbCurrentUserAction {
async getHref(): Promise<string | undefined> {
return undefined;
}
async execute(): Promise<void> {
const modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);
const modal = modalManager.open(this, MY_SETTINGS_MODAL, {
data: {},
});
await modal.onSubmit();
}
}
export default SettingsAction;
```
### Action with Conditions
```typescript
const manifest: ManifestCurrentUserActionDefaultKind = {
type: 'currentUserAction',
kind: 'default',
alias: 'My.CurrentUserAction.Admin',
name: 'Admin Settings',
api: () => import('./admin-action.js'),
meta: {
icon: 'icon-lock',
label: 'Admin Settings',
},
conditions: [
{
alias: 'Umb.Condition.UserPermission.Admin',
// Only show for admin users
},
],
};
```
### Custom Element Action
```typescript
import type { ManifestCurrentUserAction } from '@umbraco-cms/backoffice/extension-registry';
const manifest: ManifestCurrentUserAction = {
type: 'currentUserAction',
alias: 'My.CurrentUserAction.Custom',
name: 'Custom Action',
element: () => import('./custom-action.element.js'),
api: () => import('./custom-action.js'),
meta: {},
};
```
### Navigating to Internal Route
```typescript
export class ProfileAction extends UmbControllerBase implements UmbCurrentUserAction {
async getHref(): Promise<string | undefined> {
// Navigate to a backoffice route
return '/section/settings/workspace/user-profile';
}
async execute(): Promise<void> {}
}
```
## Meta Properties (Default Kind)
| Property | Description |
|----------|-------------|
| `icon` | Icon displayed in the menu |
| `label` | Text displayed in the menu |
## Action Interface
| Method | Description |
|--------|-------------|
| `getHref()` | Returns URL for link-based actions |
| `execute()` | Called when action is clicked (if no href) |
That's it! Always fetch fresh docs, keep examples minimal, generate complete working code.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.