feat(auth): 实现禁用用户拦截机制防止禁用用户访问
- 新增工具函数 isUserDisabled 判断用户是否被禁用 - 新增 blockDisabledUser 函数拦截禁用用户,清除登录态弹窗提示并跳转登录页 - UserContext 启动时异步校验用户状态,禁用则拦截并退出 - UserContext 的 refreshUser、syncFromStorage、loginUser 接口均增加禁用检查 - 登录相关 API 登录前校验用户状态,禁用时拒绝登录 - 登录页面保存登录态前校验,禁用用户弹窗提示阻断登录流程 - 用户状态定义:status 0 为正常,1 为禁用 - 新增用户管理页支持查询和管理用户状态 - 文档中补充用户状态与禁用机制说明及拦截层级介绍
This commit is contained in:
@@ -248,9 +248,9 @@ export default function StoreCenterPage() {
|
||||
<Text className='text-orange-500 text-sm flex-shrink-0'>去开启</Text>
|
||||
</View>
|
||||
|
||||
<Text className='text-gray-300 text-xs text-center block'>
|
||||
未来更多功能将持续上线
|
||||
</Text>
|
||||
{/*<Text className='text-gray-300 text-xs text-center block'>*/}
|
||||
{/* 未来更多功能将持续上线*/}
|
||||
{/*</Text>*/}
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user