You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adminforth/documentation/docs/tutorial/03-Customization/12-security.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -223,7 +223,7 @@ export const admin = new AdminForth({
223
223
auth: {
224
224
adminUserAuthorize: [
225
225
async ({adminUser, adminforth, extra}) => {
226
-
if (adminUser.dbUser.role==='banned') {
226
+
if (adminUser.dbUser.status==='banned') {
227
227
return { allowed: false, error: "User is banned" };
228
228
}
229
229
return { allowed: true };
@@ -236,4 +236,4 @@ export const admin = new AdminForth({
236
236
237
237
```
238
238
239
-
Now, if a user’s role is changed to "banned", they won’t be able to perform any actions and will be automatically logged out upon accessing the page.
239
+
Now, if a user’s field "status" is changed to "banned", they won’t be able to perform any actions and will be automatically logged out upon accessing the page.
0 commit comments