Commit d2f77847 by zhongmh

增加权限控制

parent b7a68604
......@@ -6,7 +6,7 @@
<groupId>cn.yunmaozj.tools</groupId>
<artifactId>maven-site-upload-parent</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
<description>站点上传插件</description>
<modules>
<module>site-upload-maven-plugin</module>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>maven-site-upload-parent</artifactId>
<groupId>cn.yunmaozj.tools</groupId>
<version>1.0.1</version>
<version>1.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -23,7 +23,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
public UserDetailsService userDetailsService(){
InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
manager.createUser(User.builder().username("user").password("123456").roles("root").build());
manager.createUser(User.withDefaultPasswordEncoder().username("user").password("99boliyuan").roles("root").build());
return manager;
}
......
......@@ -101,9 +101,9 @@ public class Developer {
e.printStackTrace();
return new ArrayList<>();
}
List<Element> elements = document.getRootElement().elements(TAG_ROLES);
List<Element> elements = document.getRootElement().elements(parentTag);
if (elements.size() > 0) {
elements = elements.get(0).elements(TAG_ROLE);
elements = elements.get(0).elements(childTag);
} else {
return new ArrayList<>();
}
......
......@@ -22,13 +22,6 @@ public class DeveloperTest extends ApplicationTest {
@Test
public void init() throws IOException {
Developer developer = new Developer(systemFile, "zhongmh", "钟明宏");
developer.setPassword("123456");
developer.addProject("boliyuan-web");
developer.addProject("boliyuan-common-util");
developer.addProject("boliyuan-web-util");
developer.addRole("admin");
developer.addRole("developer");
developer.addRole("master");
System.out.println(Arrays.toString(developer.projects().toArray()));
System.out.println(Arrays.toString(developer.roles().toArray()));
}
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>maven-site-upload-parent</artifactId>
<groupId>cn.yunmaozj.tools</groupId>
<version>1.0.2</version>
<version>1.0.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -64,10 +64,6 @@ public class SiteUploadMojo extends AbstractMojo {
getLog().info("skip site-upload");
return;
}
if ("pom".equals(project.getPackaging())) {
getLog().info("the project packaging is pom");
return;
}
for (Directory directory : directories.getFileList()) {
File inputDirectory = directory.getPath();
if (!inputDirectory.exists()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment