AGENT SKILL

apple-notes-enterprise-rbac

Implement access control for multi-user Apple Notes automation. Trigger: "apple notes access control".

License 许可
MIT
最近更新
2026-06-24
Stars
★ 67
Forks
24

01 前言 Front Matter

name
apple-notes-enterprise-rbac
tags
[ "saas", "macos", "apple-notes", "automation" ]
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Implement access control for multi-user Apple Notes automation. Trigger: "apple notes access control".
allowed-tools
Read, Write, Edit, Bash(osascript:*), Grep
compatible-with
claude-code

03 SKILL.md 正文

Apple Notes Enterprise RBAC

Overview

Apple Notes does not have built-in RBAC. For multi-user scenarios, implement access control at the automation layer.

Account-Based Access Control

// Apple Notes supports multiple accounts (iCloud, Gmail, etc.)
// Use account separation as a basic access control mechanism

const Notes = Application("Notes");
const accounts = Notes.accounts();

// List all accounts
accounts.forEach(a => {
  console.log(`Account: ${a.name()} — ${a.folders().length} folders`);
});

// Restrict operations to specific account
function getAccountByName(name) {
  const account = Notes.accounts().find(a => a.name() === name);
  if (!account) throw new Error(`Account not found: ${name}`);
  return account;
}

Folder-Based Permission Model

// Implement folder-level access control
interface FolderPermission {
  folder: string;
  allowedUsers: string[];
  operations: ("read" | "write" | "delete")[];
}

const PERMISSIONS: FolderPermission[] = [
  { folder: "Shared", allowedUsers: ["*"], operations: ["read"] },
  { folder: "Private", allowedUsers: ["admin"], operations: ["read", "write", "delete"] },
  { folder: "Team", allowedUsers: ["team-lead", "member"], operations: ["read", "write"] },
];

Resources

04 同仓库更多 Skills