[PR #5406] [MERGED] docs: clarify relationship between adminRoles and custom access control #5987

Closed
opened 2026-03-13 12:43:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5406
Author: @GautamBytes
Created: 10/18/2025
Status: Merged
Merged: 10/23/2025
Merged by: @Bekacru

Base: canaryHead: docs/clarify-admin-roles


📝 Commits (4)

  • 6b465c2 clarify adminRoles with custom access control
  • 95eac98 minor tweak
  • c3b7eac move note to callout
  • 024341f Merge branch 'canary' into docs/clarify-admin-roles

📊 Changes

1 file changed (+5 additions, -3 deletions)

View changed files

📝 docs/content/docs/plugins/admin.mdx (+5 -3)

📄 Description

Fixes #5380

Summary

Clarifies the documentation about when adminRoles is required vs when custom access control is sufficient.

Changes

  • Updated "Admin Roles" section heading to specify it applies when not using custom access control
  • Added Note explaining adminRoles is not required when using custom AC (via ac and roles)
  • Updated warning callout to clarify it only applies without custom AC
  • Added new subsection "Using Custom Access Control Without adminRoles" with working example

Context

The previous documentation had ambiguous guidance that caused confusion (reported in #5380). User testing confirmed that adminRoles is NOT required when using custom access control - the custom role definitions determine permissions directly.

Type of Change

  • Documentation update
  • Bug fix
  • New feature
  • Breaking change

Testing

  • Documentation builds successfully locally
  • All sections render correctly
  • Code examples are syntactically correct
  • Navigation links work properly

Summary by cubic

Clarified admin plugin docs: adminRoles are only needed when not using custom access control; custom roles defined via ac and roles control permissions.

Updated the Admin Roles section, added a scoped note and warning, and included a working example of custom AC without adminRoles.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5406 **Author:** [@GautamBytes](https://github.com/GautamBytes) **Created:** 10/18/2025 **Status:** ✅ Merged **Merged:** 10/23/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `docs/clarify-admin-roles` --- ### 📝 Commits (4) - [`6b465c2`](https://github.com/better-auth/better-auth/commit/6b465c2fff6cb194ee20b3fcdc4378af8d2daaad) clarify adminRoles with custom access control - [`95eac98`](https://github.com/better-auth/better-auth/commit/95eac98a3223caec85d00186df68781708160869) minor tweak - [`c3b7eac`](https://github.com/better-auth/better-auth/commit/c3b7eacc72a8515d93fc2b6b5f3b7e2d11360cc2) move note to callout - [`024341f`](https://github.com/better-auth/better-auth/commit/024341f0c6a831bf275106b87ab8bef8315ef39d) Merge branch 'canary' into docs/clarify-admin-roles ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/admin.mdx` (+5 -3) </details> ### 📄 Description Fixes #5380 ## Summary Clarifies the documentation about when `adminRoles` is required vs when custom access control is sufficient. ## Changes - Updated "Admin Roles" section heading to specify it applies when **not** using custom access control - Added Note explaining `adminRoles` is not required when using custom AC (via `ac` and `roles`) - Updated warning callout to clarify it only applies without custom AC - Added new subsection "Using Custom Access Control Without adminRoles" with working example ## Context The previous documentation had ambiguous guidance that caused confusion (reported in #5380). User testing confirmed that `adminRoles` is NOT required when using custom access control - the custom role definitions determine permissions directly. ## Type of Change - [x] Documentation update - [ ] Bug fix - [ ] New feature - [ ] Breaking change ## Testing - [x] Documentation builds successfully locally - [x] All sections render correctly - [x] Code examples are syntactically correct - [x] Navigation links work properly <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Clarified admin plugin docs: adminRoles are only needed when not using custom access control; custom roles defined via ac and roles control permissions. Updated the Admin Roles section, added a scoped note and warning, and included a working example of custom AC without adminRoles. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:43:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5987