Skip to content

Commit 226c694

Browse files
committed
feat: add isExternalUser flag to AdminUser interface for handling non-database users
1 parent 07c5de4 commit 226c694

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

adminforth/types/Common.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ export interface AdminUser {
104104
* User record fetched from database, from resource defined in {@link AdminForthConfig.auth.usersResourceId}
105105
*/
106106
dbUser: any,
107+
108+
/**
109+
* Flag which indicates that this user is not real user from database, but external user from e.g. custom website.
110+
* True here is not possible in AdminForth built-in functions, auth middleware etc.
111+
* True value is only possible in your need to tell AdminForth that this is not real "fake" admin user
112+
*/
113+
isExternalUser?: boolean,
107114
}
108115

109116

0 commit comments

Comments
 (0)