Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e96f79

Browse files
committed
Merge branch 'dev' of github.com:lowcoder-org/lowcoder into dev
2 parents6c7a7c5 +f2b7d10 commit3e96f79

File tree

2 files changed

+39
-5
lines changed

2 files changed

+39
-5
lines changed

‎client/packages/lowcoder/src/comps/comps/tableComp/column/simpleColumnTypeComps.tsx‎

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { trans } from "i18n";
77
import{useStyle}from"comps/controls/styleControl";
88
import{ButtonStyle}from"comps/controls/styleControlConstants";
99
import{Button100}from"comps/comps/buttonComp/buttonCompConstants";
10+
import{IconControl}from"comps/controls/iconControl";
11+
import{hasIcon}from"comps/utils";
1012

1113
exportconstColumnValueTooltip=trans("table.columnValueTooltip");
1214

@@ -20,7 +22,7 @@ export const ButtonTypeOptions = [
2022
value:"default",
2123
},
2224
{
23-
label:trans("text"),
25+
label:trans("table.text"),
2426
value:"text",
2527
},
2628
]asconst;
@@ -32,23 +34,36 @@ export const ButtonComp = (function () {
3234
onClick:ActionSelectorControlInContext,
3335
loading:BoolCodeControl,
3436
disabled:BoolCodeControl,
37+
prefixIcon:IconControl,
38+
suffixIcon:IconControl,
3539
};
3640
returnnewColumnTypeCompBuilder(
3741
childrenMap,
3842
(props)=>{
3943
constButtonStyled=()=>{
4044
conststyle=useStyle(ButtonStyle);
45+
consthasText=!!props.text;
46+
consthasPrefixIcon=hasIcon(props.prefixIcon);
47+
consthasSuffixIcon=hasIcon(props.suffixIcon);
48+
consticonOnly=!hasText&&(hasPrefixIcon||hasSuffixIcon);
49+
4150
return(
4251
<Button100
4352
type={props.buttonType}
4453
onClick={props.onClick}
4554
loading={props.loading}
4655
disabled={props.disabled}
4756
$buttonStyle={props.buttonType==="primary" ?style :undefined}
48-
style={{margin:0}}
57+
style={{
58+
margin:0,
59+
width:iconOnly ?'auto' :undefined,
60+
minWidth:iconOnly ?'auto' :undefined,
61+
padding:iconOnly ?'0 8px' :undefined
62+
}}
63+
icon={hasPrefixIcon ?props.prefixIcon :undefined}
4964
>
50-
{/* prevent the button from disappearing */}
51-
{!props.text ?" " :props.text}
65+
{hasText ?props.text :(iconOnly ?null :" ")}
66+
{hasSuffixIcon&&!props.loading&&<spanstyle={{marginLeft:hasText ?'8px' :0}}>{props.suffixIcon}</span>}
5267
</Button100>
5368
);
5469
};
@@ -62,6 +77,12 @@ export const ButtonComp = (function () {
6277
label:trans("table.columnValue"),
6378
tooltip:ColumnValueTooltip,
6479
})}
80+
{children.prefixIcon.propertyView({
81+
label:trans("button.prefixIcon"),
82+
})}
83+
{children.suffixIcon.propertyView({
84+
label:trans("button.suffixIcon"),
85+
})}
6586
{children.buttonType.propertyView({
6687
label:trans("table.type"),
6788
radioButton:true,

‎server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/authentication/service/AuthenticationApiServiceImpl.java‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,23 @@ protected Mono<AuthUser> authenticate(String authId, @Deprecated String source,
9898
})
9999
.flatMap(findAuthConfig -> {
100100
context.setAuthConfig(findAuthConfig.authConfig());
101+
// Check if email/password is superadmin before checking EMAIL provider enable
101102
if (findAuthConfig.authConfig().getSource().equals("EMAIL")) {
102-
if(StringUtils.isBlank(context.getOrgId())) {
103+
if(StringUtils.isBlank(context.getOrgId())) {
103104
context.setOrgId(Optional.ofNullable(findAuthConfig.organization()).map(Organization::getId).orElse(null));
104105
}
106+
// --- Superadmin check start ---
107+
if (contextinstanceofFormAuthRequestContextformContext) {
108+
Stringemail =formContext.getLoginId();
109+
Stringpassword =formContext.getPassword();
110+
StringsuperAdminEmail =commonConfig.getSuperAdmin().getUserName();
111+
StringsuperAdminPassword =commonConfig.getSuperAdmin().getPassword();
112+
if (StringUtils.equalsIgnoreCase(email,superAdminEmail) &&StringUtils.equals(password,superAdminPassword)) {
113+
// Allow superadmin login even if EMAIL provider is disabled
114+
returnMono.just(findAuthConfig);
115+
}
116+
}
117+
// --- Superadmin check end ---
105118
if(!findAuthConfig.authConfig().getEnable()) {
106119
returnMono.error(newBizException(EMAIL_PROVIDER_DISABLED,"EMAIL_PROVIDER_DISABLED"));
107120
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp