mirror of https://gitee.com/topiam/eiam
⚡ 优化代码
parent
e96846e8fe
commit
207d0ff7f7
File diff suppressed because one or more lines are too long
|
@ -136,7 +136,7 @@ const CreateUser = (props: CreateUserProps) => {
|
|||
*/
|
||||
const cancel = async () => {
|
||||
if (onCancel) {
|
||||
await onCancel();
|
||||
onCancel();
|
||||
}
|
||||
setSubmitLoading(false);
|
||||
form.resetFields();
|
||||
|
|
|
@ -38,3 +38,105 @@ export type GetApp = {
|
|||
enabled: boolean;
|
||||
remark: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 应用权限列表
|
||||
*/
|
||||
export type AppAccessPolicyList = {
|
||||
id: string;
|
||||
//主体ID
|
||||
subjectId: string;
|
||||
//主体名称
|
||||
subjectName: string;
|
||||
//主体类型
|
||||
subjectType: string;
|
||||
//应用类型
|
||||
appType: string;
|
||||
appProtocol: string;
|
||||
//Effect
|
||||
effect: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 角色列表
|
||||
*/
|
||||
type AppPermissionRoleList = {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
enabled: boolean;
|
||||
appId: string;
|
||||
remark: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 角色列表
|
||||
*/
|
||||
type GetAppPermissionRole = {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
enabled: boolean;
|
||||
appId: string;
|
||||
remark: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 资源列表
|
||||
*/
|
||||
type AppPermissionResourceList = {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
enabled: boolean;
|
||||
desc: string;
|
||||
appId: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 权限资源点
|
||||
*/
|
||||
type AppPermissionResourceActionList = {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
desc: string;
|
||||
appId: string;
|
||||
menus: {
|
||||
access: string;
|
||||
id: string;
|
||||
name: string;
|
||||
}[];
|
||||
datas: {
|
||||
access: string;
|
||||
id: string;
|
||||
name: string;
|
||||
}[];
|
||||
buttons: {
|
||||
access: string;
|
||||
id: string;
|
||||
name: string;
|
||||
}[];
|
||||
apis: {
|
||||
access: string;
|
||||
id: string;
|
||||
name: string;
|
||||
}[];
|
||||
others: {
|
||||
access: string;
|
||||
id: string;
|
||||
name: string;
|
||||
}[];
|
||||
};
|
||||
|
||||
/**
|
||||
* 权限授权列表
|
||||
*/
|
||||
type AppPermissionPolicyList = {
|
||||
id: string;
|
||||
name: string;
|
||||
code: string;
|
||||
enabled: boolean;
|
||||
desc: string;
|
||||
appId: string;
|
||||
};
|
||||
|
|
|
@ -18,3 +18,14 @@
|
|||
export type SecurityDefensePolicyConfig = {
|
||||
contentSecurityPolicy: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* 安全基础配置
|
||||
*/
|
||||
export type BasicSettingConfig = {
|
||||
frequentRegisterCheck: boolean;
|
||||
emailVerifiedDefault: boolean;
|
||||
sendWelcomeEmail: boolean;
|
||||
verifyOldEmail: boolean;
|
||||
verifyOldPhone: boolean;
|
||||
};
|
||||
|
|
|
@ -26,6 +26,7 @@ import MailTemplateConfig from './MailTemplateConfig';
|
|||
import useStyle from './style';
|
||||
import classnames from 'classnames';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { EmailTemplateList } from '../../data.d';
|
||||
|
||||
const prefixCls = 'setting-mail-template';
|
||||
|
||||
|
@ -36,7 +37,7 @@ export default (props: { visible: boolean }) => {
|
|||
const [content, setContent] = useState<string>('');
|
||||
const [configType, setConfigType] = useState<string>('');
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [dataSource, setDataSource] = useState<SettingAPI.EmailTemplateList[]>([]);
|
||||
const [dataSource, setDataSource] = useState<EmailTemplateList[]>([]);
|
||||
const [browseVisible, setBrowseVisible] = useState<boolean>(false);
|
||||
const { styles } = useStyle(prefixCls);
|
||||
const intl = useIntl();
|
||||
|
@ -85,7 +86,7 @@ export default (props: { visible: boolean }) => {
|
|||
<div className={styles.main}>
|
||||
<ProCard className={`${prefixCls}`}>
|
||||
<Spin spinning={loading}>
|
||||
<ProList<SettingAPI.EmailTemplateList>
|
||||
<ProList<EmailTemplateList>
|
||||
rowKey="type"
|
||||
split
|
||||
cardProps={{ bodyStyle: { padding: 0 } }}
|
||||
|
|
|
@ -40,7 +40,7 @@ export interface GetBoundIdpList {
|
|||
* 账户菜单类型
|
||||
*/
|
||||
export enum AccountSettingsStateKey {
|
||||
BASE = 'base',
|
||||
SECURITY = 'security',
|
||||
BIND = 'bind',
|
||||
base = 'base',
|
||||
security = 'security',
|
||||
bind = 'bind',
|
||||
}
|
||||
|
|
|
@ -31,9 +31,15 @@ export enum InitLoginType {
|
|||
/**
|
||||
* 仅允许应用发起 SSO
|
||||
*/
|
||||
ONLY_APP_INIT_SSO = 'only_app_init_sso',
|
||||
only_app_init_sso = 'only_app_init_sso',
|
||||
/**
|
||||
* 门户或应用发起 SSO
|
||||
*/
|
||||
PORTAL_OR_APP_INIT_SSO = 'portal_or_app_init_sso',
|
||||
portal_or_app_init_sso = 'portal_or_app_init_sso',
|
||||
}
|
||||
|
||||
export type AppGroupList = {
|
||||
id: string;
|
||||
name: string;
|
||||
appCount: number;
|
||||
};
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import type { IDP_TYPE, MFA_FACTOR } from '@/constants';
|
||||
import type { IDP_TYPE } from '@/constants';
|
||||
|
||||
/**
|
||||
* 登录参数类型
|
||||
|
@ -44,9 +44,3 @@ export type IdpList = {
|
|||
export type LoginConfig = {
|
||||
idps: IdpList[];
|
||||
};
|
||||
|
||||
export type MfaFactor = {
|
||||
factor: MFA_FACTOR;
|
||||
target?: string;
|
||||
usable: boolean;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue