欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

flowable 6.6.0 去掉自带的登录权限  

程序员文章站 2022-03-23 09:52:05
...

1. 找到项目maven目录

flowable 6.6.0 去掉自带的登录权限
            
    
    
         

2.在自己项目里面建相同包名,类名

package org.flowable.ui.modeler.conf; 重写ModelerSecurityConfiguration

package org.flowable.ui.modeler.conf;

import org.flowable.ui.common.security.SecurityConstants;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler;

/**
 * 说明:重构ModelerSecurity
 * from:www.fhadmin.cn
 */
@Configuration(proxyBeanMethods = false)
@EnableWebSecurity
public classModelerSecurityConfiguration{

    @Configuration
    @Order(SecurityConstants.MODELER_API_SECURITY_ORDER)
    public static classModelerApiWebSecurityConfigurationAdapterextendsWebSecurityConfigurerAdapter{
    	
        @Override
        protectedvoidconfigure(HttpSecurity http)throws Exception {
        	
        	SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
    		successHandler.setTargetUrlParameter("redirectTo");

    		http.headers().frameOptions().disable();
        	
        	http.csrf().disable().authorizeRequests().antMatchers("/**/**").permitAll().anyRequest().authenticated().and().httpBasic();
        }

    }

}