Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Fix login bug #4026

Merged
merged 2 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions dinky-admin/src/main/java/org/dinky/configure/AppConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,16 @@ public void addInterceptors(InterceptorRegistry registry) {
}))
.addPathPatterns("/api/**", "/openapi/**")
.excludePathPatterns(
"/api/login", "/api/ldap/ldapEnableStatus", "/download/**", "/druid/**", "/api/version");
"/api/login",
"/api/sysConfig/getNeededCfg",
"/api/sysConfig/setInitConfig",
"/download/**",
"/druid/**",
"/api/version");

registry.addInterceptor(new TenantInterceptor())
.addPathPatterns("/api/**")
.excludePathPatterns("/api/login", "/api/ldap/ldapEnableStatus")
.excludePathPatterns("/api/login", "/api/sysConfig/getNeededCfg", "/api/sysConfig/setInitConfig")
.addPathPatterns("/api/alertGroup/**")
.addPathPatterns("/api/alertHistory/**")
.addPathPatterns("/api/alertInstance/**")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import org.dinky.data.enums.BusinessType;
import org.dinky.data.enums.Status;
import org.dinky.data.exception.AuthException;
import org.dinky.data.model.SystemConfiguration;
import org.dinky.data.model.rbac.User;
import org.dinky.data.result.Result;
import org.dinky.service.LdapService;
Expand All @@ -43,7 +42,6 @@
import org.springframework.web.bind.annotation.RestController;

import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaIgnore;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
Expand All @@ -63,13 +61,6 @@ public class LdapController {
@Autowired
UserService userService;

@GetMapping("/ldapEnableStatus")
@SaIgnore
@ApiOperation("Get LDAP enable status")
public Result<Boolean> ldapStatus() {
return Result.succeed(SystemConfiguration.getInstances().getLdapEnable().getValue());
}

@GetMapping("/testConnection")
@ApiOperation("Test connection to LDAP server")
@SaCheckLogin
Expand Down
6 changes: 1 addition & 5 deletions dinky-web/src/pages/Other/Welcome/WelcomeItem/FinishPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ const FinishPage = () => {
status='success'
title={l('welcome.finish.title')}
subTitle={l('welcome.finish')}
extra={[
<Button type='primary' onClick={() => (window.location.href = '/user/login')}>
{l('welcome.goLogin')}
</Button>
]}
extra={[<a href='/'>{l('welcome.goLogin')}</a>]}
/>
);
};
Expand Down
Loading