mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-02 06:43:23 +08:00
feat: 添加允许成员自主注册
This commit is contained in:
@@ -190,7 +190,7 @@ export interface DomainCustomOAuth {
|
||||
access_token_url?: string;
|
||||
/** 自定义OAuth授权URL */
|
||||
authorize_url?: string;
|
||||
/** 用户信息回包中的头像URL字段名` */
|
||||
/** 用户信息回包中的头像URL字段名 */
|
||||
avatar_field?: string;
|
||||
/** 自定义客户端ID */
|
||||
client_id?: string;
|
||||
@@ -202,7 +202,32 @@ export interface DomainCustomOAuth {
|
||||
enable?: boolean;
|
||||
/** 用户信息回包中的ID字段名 */
|
||||
id_field?: string;
|
||||
/** 用户信息回包中的用户名字段名` */
|
||||
/** 用户信息回包中的用户名字段名 */
|
||||
name_field?: string;
|
||||
/** 自定义OAuth Scope列表 */
|
||||
scopes?: string[];
|
||||
/** 自定义OAuth用户信息URL */
|
||||
userinfo_url?: string;
|
||||
}
|
||||
|
||||
export interface DomainCustomOAuthReq {
|
||||
/** 自定义OAuth访问令牌URL */
|
||||
access_token_url?: string;
|
||||
/** 自定义OAuth授权URL */
|
||||
authorize_url?: string;
|
||||
/** 用户信息回包中的头像URL字段名 */
|
||||
avatar_field?: string;
|
||||
/** 自定义客户端ID */
|
||||
client_id?: string;
|
||||
/** 自定义客户端密钥 */
|
||||
client_secret?: string;
|
||||
/** 用户信息回包中的邮箱字段名 */
|
||||
email_field?: string;
|
||||
/** 自定义OAuth开关 */
|
||||
enable?: boolean;
|
||||
/** 用户信息回包中的ID字段名 */
|
||||
id_field?: string;
|
||||
/** 用户信息回包中的用户名字段名 */
|
||||
name_field?: string;
|
||||
/** 自定义OAuth Scope列表 */
|
||||
scopes?: string[];
|
||||
@@ -219,6 +244,15 @@ export interface DomainDingtalkOAuth {
|
||||
enable?: boolean;
|
||||
}
|
||||
|
||||
export interface DomainDingtalkOAuthReq {
|
||||
/** 钉钉客户端ID */
|
||||
client_id?: string;
|
||||
/** 钉钉客户端密钥 */
|
||||
client_secret?: string;
|
||||
/** 钉钉OAuth开关 */
|
||||
enable?: boolean;
|
||||
}
|
||||
|
||||
export interface DomainIPInfo {
|
||||
/** ASN */
|
||||
asn?: string;
|
||||
@@ -397,6 +431,8 @@ export interface DomainSetting {
|
||||
dingtalk_oauth?: DomainDingtalkOAuth;
|
||||
/** 是否禁用密码登录 */
|
||||
disable_password_login?: boolean;
|
||||
/** 是否开启自动登录 */
|
||||
enable_auto_login?: boolean;
|
||||
/** 是否开启SSO */
|
||||
enable_sso?: boolean;
|
||||
/** 是否强制两步验证 */
|
||||
@@ -484,11 +520,13 @@ export interface DomainUpdateModelReq {
|
||||
|
||||
export interface DomainUpdateSettingReq {
|
||||
/** 自定义OAuth配置 */
|
||||
custom_oauth?: DomainCustomOAuth;
|
||||
custom_oauth?: DomainCustomOAuthReq;
|
||||
/** 钉钉OAuth配置 */
|
||||
dingtalk_oauth?: DomainDingtalkOAuth;
|
||||
dingtalk_oauth?: DomainDingtalkOAuthReq;
|
||||
/** 是否禁用密码登录 */
|
||||
disable_password_login?: boolean;
|
||||
/** 是否开启自动登录 */
|
||||
enable_auto_login?: boolean;
|
||||
/** 是否开启SSO */
|
||||
enable_sso?: boolean;
|
||||
/** 是否强制两步验证 */
|
||||
|
||||
@@ -110,6 +110,15 @@ const User = () => {
|
||||
配置
|
||||
</Button>
|
||||
</StyledCard>
|
||||
<StyledCard>
|
||||
<StyledLabel>允许成员自主注册</StyledLabel>
|
||||
<Switch
|
||||
checked={data?.enable_auto_login}
|
||||
onChange={(e) =>
|
||||
updateSetting({ enable_auto_login: e.target.checked })
|
||||
}
|
||||
/>
|
||||
</StyledCard>
|
||||
<LoginHistory />
|
||||
</Stack>
|
||||
</Grid>
|
||||
|
||||
@@ -61,7 +61,7 @@ const LoginHistory = () => {
|
||||
},
|
||||
];
|
||||
return (
|
||||
<Card sx={{ flex: 1, height: 'calc(100% - 258px)' }}>
|
||||
<Card sx={{ flex: 1, height: 'calc(100% - 358px)' }}>
|
||||
<Stack
|
||||
direction='row'
|
||||
justifyContent='space-between'
|
||||
|
||||
Reference in New Issue
Block a user