[PR #3002] [MERGED] docs(admin): clarify on the checkRolePermission function #21499

Closed
opened 2026-04-15 20:24:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3002
Author: @Muhammed-Rahif
Created: 6/12/2025
Status: Merged
Merged: 6/13/2025
Merged by: @Bekacru

Base: mainHead: patch-1


📝 Commits (3)

  • e636fc3 docs(admin): clarify on the checkRolePermission function
  • f3d4b5f Update docs/content/docs/plugins/admin.mdx
  • e6758f8 Update admin.mdx

📊 Changes

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

View changed files

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

📄 Description

I was initially confused by the existing documentation, I thought the checkRolePermission function was meant to check if the currently logged-in user has a specific role. However, I later realized that it's actually used to check whether a role has certain permissions. This PR updates the docs to clarify that distinction and avoid future confusion.


🔄 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/3002 **Author:** [@Muhammed-Rahif](https://github.com/Muhammed-Rahif) **Created:** 6/12/2025 **Status:** ✅ Merged **Merged:** 6/13/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (3) - [`e636fc3`](https://github.com/better-auth/better-auth/commit/e636fc3fe72831688fc05be121cd634fa1c1c81e) docs(admin): clarify on the `checkRolePermission` function - [`f3d4b5f`](https://github.com/better-auth/better-auth/commit/f3d4b5fb015b3d9c5f773cf208c92d6a136db93e) Update docs/content/docs/plugins/admin.mdx - [`e6758f8`](https://github.com/better-auth/better-auth/commit/e6758f82545a7111b81393520beb010eebfa312f) Update admin.mdx ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/admin.mdx` (+5 -3) </details> ### 📄 Description I was initially confused by the existing documentation, I thought the `checkRolePermission` function was meant to check if the currently logged-in user has a specific role. However, I later realized that it's actually used to check whether a role has certain permissions. This PR updates the docs to clarify that distinction and avoid future confusion. --- <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-04-15 20:24:27 -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#21499