Skip to content

Commit

Permalink
[Bug] Fix login bug (#4026)
Browse files Browse the repository at this point in the history
Co-authored-by: gaoyan1998 <[email protected]>
  • Loading branch information
gaoyan1998 and gaoyan1998 authored Dec 7, 2024
1 parent 0da1714 commit 66b97b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
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

0 comments on commit 66b97b0

Please sign in to comment.