Netlify CMS (now Decap CMS) uses Git-based authentication, meaning user management depends on your Git provider (GitHub, GitLab, Bitbucket) and authentication backend. This guide covers user management across different configurations.
Understanding Netlify CMS User Management
Git-Based Access Control
Unlike traditional CMSs with database users, Netlify CMS grants access based on Git repository permissions:
Repository Access = CMS Access
- GitHub Repository Collaborators → Can access Netlify CMS
- GitLab Project Members → Can access Netlify CMS
- Bitbucket Workspace Members → Can access Netlify CMS
Authentication Backends
Netlify CMS supports multiple authentication methods:
1. Git Gateway (Netlify Identity)
- Managed by Netlify
- User registration/invitation via Netlify UI
- No direct Git access required
- Best for non-technical editors
2. GitHub OAuth
- Direct GitHub authentication
- Requires GitHub repository access
- Best for developer teams
3. GitLab OAuth
- Direct GitLab authentication
- Requires GitLab project access
4. Bitbucket OAuth
- Direct Bitbucket authentication
- Requires Bitbucket repository access
Method 1: Git Gateway (Netlify Identity)
Best for: Non-technical editors, clients, content teams without Git knowledge
Adding Users via Git Gateway
Step 1: Enable Netlify Identity
Step 2: Configure Registration Settings
Identity → Settings and usage
Registration preferences:
- Open: Anyone can sign up (not recommended)
- Invite only: Only invited users (recommended)
Step 3: Invite Users
Via Netlify UI:
- Identity → Invite users
- Enter email address
- Click Send
- User receives invitation email
- User clicks link to set password
- User can now access
/adminon your site
Invite Multiple Users:
1. Click "Invite users"
2. Enter multiple emails (comma-separated)
3. Send invitations
Step 4: Configure CMS
Ensure config.yml uses Git Gateway backend:
# static/admin/config.yml
backend:
name: git-gateway
branch: main
# Enable editorial workflow (optional)
publish_mode: editorial_workflow
Removing Users via Git Gateway
Option 1: Delete User (Permanent)
- Netlify Dashboard → Identity
- Find user
- Click ... → Delete user
- Confirm deletion
- User immediately loses access
Option 2: Disable User (Temporary)
- Identity → Find user
- Click user email
- Actions → Suspend user
- User cannot log in (can be re-enabled)
Managing User Roles (Git Gateway)
Git Gateway doesn't have built-in roles. Access control via:
1. Editorial Workflow
Enable draft/review/publish workflow:
# config.yml
publish_mode: editorial_workflow
Workflow stages:
- Draft - Content creator saves work
- In Review - Ready for review
- Ready - Approved, ready to publish
- Published - Merged to main branch
All users can create drafts, but publishing still requires Git repository permissions.
2. Repository Permissions
Control who can approve pull requests:
- GitHub → Repository → Settings → Branches
- Select
mainbranch - Enable "Require pull request reviews before merging"
- Editors can create PRs, but admins must approve
Method 2: GitHub OAuth
Best for: Developer teams, technical users familiar with Git
Adding Users via GitHub OAuth
Step 1: Configure GitHub OAuth Backend
# static/admin/config.yml
backend:
name: github
repo: your-username/your-repo
branch: main
Step 2: Add Users to GitHub Repository
- GitHub → Your repository
- Settings → Collaborators
- Click Add people
- Enter GitHub username or email
- Select role:
- Read - Can view, clone (no CMS access for editing)
- Write - Can create branches, edit (CMS access)
- Admin - Full control
Step 3: User Authentication
- User visits
yoursite.com/admin - Clicks "Login with GitHub"
- Authorizes Netlify CMS OAuth app
- Redirected to CMS interface
Removing Users via GitHub OAuth
- GitHub → Repository → Settings → Collaborators
- Find user
- Click Remove
- User immediately loses CMS access
Repository Permission Levels
Read:
- Can view repository
- Can clone repository
- Cannot edit via CMS
Write:
- Can create branches
- Can commit changes
- Can edit via CMS
- Can create pull requests
Admin:
- Full repository access
- Can merge pull requests
- Can change repository settings
- Full CMS access
Method 3: GitLab OAuth
Best for: Teams using GitLab for version control
Adding Users via GitLab OAuth
Step 1: Configure GitLab Backend
# static/admin/config.yml
backend:
name: gitlab
repo: your-username/your-repo
branch: main
Step 2: Add Users to GitLab Project
- GitLab → Your project
- Members
- Click Invite members
- Enter username or email
- Select role:
- Guest - No CMS access
- Reporter - Read-only
- Developer - Can edit via CMS
- Maintainer - Can merge, full CMS access
- Owner - Full control
Removing Users via GitLab
- GitLab → Project → Members
- Find user
- Click Remove member
- Confirm removal
Method 4: Bitbucket OAuth
Best for: Teams using Bitbucket
Adding Users via Bitbucket
Step 1: Configure Bitbucket Backend
# static/admin/config.yml
backend:
name: bitbucket
repo: your-username/your-repo
branch: main
Step 2: Add Users to Workspace
- Bitbucket → Workspace
- Workspace settings → Users and groups
- Invite user
- Assign permission:
- Read - No write access
- Write - Can edit via CMS
- Admin - Full access
Removing Users via Bitbucket
- Workspace settings → Users
- Find user
- Remove from workspace
Editorial Workflow for Access Control
Enable Editorial Workflow
# static/admin/config.yml
publish_mode: editorial_workflow
# Optional: Require approval
backend:
name: github # or gitlab
repo: your-repo
branch: main
squash_merges: true
Workflow Process
1. Draft Stage
- Any user with Write access can create drafts
- Saved as entry in CMS, no Git commit yet
2. In Review Stage
- User moves draft to "In Review"
- Creates Git branch and pull request
- Other users can review via GitHub/GitLab
3. Ready Stage
- Approved by reviewer
- Marked as ready to publish
4. Published
- Merged to main branch
- Triggers Netlify build
- Content goes live
Configure Branch Protection
GitHub:
Settings → Branches → Branch protection rules → Add rule
Branch name: main
☑ Require pull request reviews before merging
Required approvals: 1
☑ Require status checks to pass before merging
☑ Include administrators (enforce for everyone)
GitLab:
Settings → Repository → Protected Branches
Branch: main
Allowed to merge: Maintainers
Allowed to push: No one
Bulk User Management
Import Users (Git Gateway)
Netlify CLI:
# Install Netlify CLI
npm install -g netlify-cli
# Login
netlify login
# Link to site
netlify link
# Invite users from CSV
netlify identity:invite email1@example.com email2@example.com email3@example.com
CSV Format:
email
user1@example.com
user2@example.com
user3@example.com
Batch Invite Script
// invite-users.js
const fetch = require('node-fetch');
const siteId = 'YOUR_SITE_ID';
const token = 'YOUR_NETLIFY_TOKEN';
const emails = [
'user1@example.com',
'user2@example.com',
'user3@example.com'
];
async function inviteUser(email) {
const response = await fetch(`https://api.netlify.com/api/v1/sites/${siteId}/identity/users`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ email })
});
return response.json();
}
emails.forEach(async (email) => {
const result = await inviteUser(email);
console.log(`Invited ${email}:`, result);
});
Security Best Practices
1. Principle of Least Privilege
Don't give Admin access unless needed:
- Content creators: Write/Developer access
- Reviewers: Write/Developer access + review permissions
- Administrators: Admin access only when necessary
2. Enable Two-Factor Authentication
GitHub:
Settings → Password and authentication → Two-factor authentication
Enable 2FA
GitLab:
User Settings → Account → Two-Factor Authentication
Enable 2FA
Netlify Identity:
Currently not supported (use GitHub/GitLab OAuth for 2FA)
3. Audit User Access
GitHub:
Repository → Insights → Traffic → Collaborators
Review who has access
Netlify Identity:
Netlify Dashboard → Identity → Users
Review active users
4. Remove Inactive Users
Regular audit schedule:
- Monthly: Review user list
- Quarterly: Remove inactive users
- On offboarding: Immediate removal
Troubleshooting
User Can't Log In (Git Gateway)
Symptom: User receives invitation but can't access CMS.
Checklist:
- Identity enabled on Netlify site
- User confirmed email
- User set password
-
config.ymlhasbackend: git-gateway - User visiting correct domain (not preview URL)
Fix:
- Netlify → Identity → User
- Resend invitation
- Verify email confirmation
User Can Log In But Can't Edit
Symptom: User authenticated but gets "Cannot edit" error.
Causes:
- GitHub: User has Read access (needs Write)
- GitLab: User is Reporter (needs Developer)
- Branch protection: User can't push to protected branch
Fix:
- Increase repository permission level
- Or enable editorial workflow (creates PRs instead)
Too Many Users
Netlify Identity Limits:
- Free tier: 1,000 active users
- Paid tier: 5,000+ users
Exceeded limit:
- Upgrade Netlify plan
- Switch to GitHub/GitLab OAuth (no user limits)
Next Steps
- Configure Roles and Permissions - Fine-tune access control
- Set Up Editorial Workflow - Draft/review/publish process