From 8771ae6dba566c268a4025d560bb89c952e40a91 Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 20:07:07 +0100 Subject: [PATCH 01/54] teszt commit --- bugtracker/src/main/resources/templates/hello.html | 2 ++ bugtracker/src/main/resources/templates/menu.html | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 bugtracker/src/main/resources/templates/menu.html diff --git a/bugtracker/src/main/resources/templates/hello.html b/bugtracker/src/main/resources/templates/hello.html index 7e8ab54..6399c11 100644 --- a/bugtracker/src/main/resources/templates/hello.html +++ b/bugtracker/src/main/resources/templates/hello.html @@ -6,6 +6,8 @@ + +

Hello [[${#httpServletRequest.remoteUser}]]!

diff --git a/bugtracker/src/main/resources/templates/menu.html b/bugtracker/src/main/resources/templates/menu.html new file mode 100644 index 0000000..eae9e5f --- /dev/null +++ b/bugtracker/src/main/resources/templates/menu.html @@ -0,0 +1,5 @@ +
+ Home + |   + Logout +
\ No newline at end of file From a868bc7704d2d30f6f97f06b2372bdfa0c23408a Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 20:09:09 +0100 Subject: [PATCH 02/54] gitignore updates --- bugtracker/.gitignore | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/bugtracker/.gitignore b/bugtracker/.gitignore index 43fee0f..6af42a2 100644 --- a/bugtracker/.gitignore +++ b/bugtracker/.gitignore @@ -45,4 +45,21 @@ $RECYCLE.BIN/ *.DS_Store *.iml target -../.idea \ No newline at end of file +../.idea + +# Eclipse +.classpath +.project +.settings/ + +# Intellij +.idea/ +*.iml +*.iws + +# Mac +.DS_Store + +# Maven +log/ +target/ From da00147dd10f9e821678900938ee51928bf6cdde Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 20:17:35 +0100 Subject: [PATCH 03/54] =?UTF-8?q?men=C3=BC=20teszt1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/hello.html | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/bugtracker/src/main/resources/templates/hello.html b/bugtracker/src/main/resources/templates/hello.html index 6399c11..adcc5e5 100644 --- a/bugtracker/src/main/resources/templates/hello.html +++ b/bugtracker/src/main/resources/templates/hello.html @@ -4,6 +4,29 @@ Hello World! + + + + + + From 988339158a216dd8bc63629e84ad9d253bf169c6 Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 20:25:28 +0100 Subject: [PATCH 04/54] bugfix --- .../src/main/resources/templates/hello.html | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/bugtracker/src/main/resources/templates/hello.html b/bugtracker/src/main/resources/templates/hello.html index adcc5e5..e5afd12 100644 --- a/bugtracker/src/main/resources/templates/hello.html +++ b/bugtracker/src/main/resources/templates/hello.html @@ -10,26 +10,29 @@ - + + +

Hello [[${#httpServletRequest.remoteUser}]]!

From 554ec7d8da695c1accbfb6cdd4ce618db8ad20a2 Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 21:06:15 +0100 Subject: [PATCH 05/54] menu event listener --- bugtracker/src/main/resources/templates/hello.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bugtracker/src/main/resources/templates/hello.html b/bugtracker/src/main/resources/templates/hello.html index e5afd12..d8fabb0 100644 --- a/bugtracker/src/main/resources/templates/hello.html +++ b/bugtracker/src/main/resources/templates/hello.html @@ -5,7 +5,6 @@ Hello World! - @@ -19,13 +18,17 @@ renderTo: Ext.getBody(), floating: false, items: [{ - text: 'menu1', + text: 'menu item 1', },{ - text: 'menu2' + text: 'menu item 2' },{ - text: 'menu3' + text: 'menu item 3' }] }); + + menu.on('click', function(menu, item){ + alert('clicked -> ' + item.text); + }); }); From efa3e073287c9310dd8aebf6174fd3093c2be20c Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 21:16:57 +0100 Subject: [PATCH 06/54] extjs menu --- .../src/main/resources/templates/hello.html | 41 ++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/bugtracker/src/main/resources/templates/hello.html b/bugtracker/src/main/resources/templates/hello.html index d8fabb0..d391f39 100644 --- a/bugtracker/src/main/resources/templates/hello.html +++ b/bugtracker/src/main/resources/templates/hello.html @@ -10,7 +10,7 @@ From badd191e28a5b42fbc80d84910dd13e88fc02c37 Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 21:18:54 +0100 Subject: [PATCH 07/54] missing parenthesis --- bugtracker/src/main/resources/templates/hello.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bugtracker/src/main/resources/templates/hello.html b/bugtracker/src/main/resources/templates/hello.html index d391f39..328ab6d 100644 --- a/bugtracker/src/main/resources/templates/hello.html +++ b/bugtracker/src/main/resources/templates/hello.html @@ -65,7 +65,9 @@ } } ] - }] + }] + //}); + }); From 56bbec8c14d360c99a8f1ae6fe5ddfcd97a91292 Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 21:19:10 +0100 Subject: [PATCH 08/54] na most --- bugtracker/src/main/resources/templates/hello.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bugtracker/src/main/resources/templates/hello.html b/bugtracker/src/main/resources/templates/hello.html index 328ab6d..1430ab4 100644 --- a/bugtracker/src/main/resources/templates/hello.html +++ b/bugtracker/src/main/resources/templates/hello.html @@ -66,7 +66,7 @@ } ] }] - //}); + }); }); From 4f779cc835d21f5650f68eb4a7e1aff4ee5f3f54 Mon Sep 17 00:00:00 2001 From: ammolnar Date: Wed, 20 Nov 2019 22:06:35 +0100 Subject: [PATCH 09/54] bugfix --- .../src/main/java/bugtracker/MvcConfig.java | 2 ++ .../main/java/bugtracker/SecurityConfig.java | 35 +++++++++---------- .../src/main/resources/application.properties | 4 ++- .../src/main/resources/static/css/styles.css | 18 ++++++++++ .../src/main/resources/templates/hello.html | 27 ++++++++------ 5 files changed, 57 insertions(+), 29 deletions(-) diff --git a/bugtracker/src/main/java/bugtracker/MvcConfig.java b/bugtracker/src/main/java/bugtracker/MvcConfig.java index e6df303..d040a6d 100644 --- a/bugtracker/src/main/java/bugtracker/MvcConfig.java +++ b/bugtracker/src/main/java/bugtracker/MvcConfig.java @@ -40,5 +40,7 @@ public void addCorsMappings(CorsRegistry registry) { @Override public void addResourceHandlers(final ResourceHandlerRegistry registry) { registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); + registry.addResourceHandler("/css/**").addResourceLocations("classpath:/static/css/"); + registry.addResourceHandler("/js/**").addResourceLocations("classpath:/static/js/"); } } diff --git a/bugtracker/src/main/java/bugtracker/SecurityConfig.java b/bugtracker/src/main/java/bugtracker/SecurityConfig.java index 5ace695..543aba4 100644 --- a/bugtracker/src/main/java/bugtracker/SecurityConfig.java +++ b/bugtracker/src/main/java/bugtracker/SecurityConfig.java @@ -32,25 +32,24 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity httpSecurity) throws Exception { - - httpSecurity.authorizeRequests() - .antMatchers("/login*").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") - .antMatchers("/user/new").access(" hasRole('ROLE_ADMIN')") - .antMatchers("/user/all*").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") - .antMatchers("/user/modify*").access("hasRole('ROLE_ADMIN')") - .antMatchers("/project/**").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") - .antMatchers("/api/**").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") - .antMatchers("/ticket/**").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") - .and() - .csrf().disable() - .formLogin() - .loginPage("/login") - .successForwardUrl("/api/user/dispatch") - .permitAll() - .and() - .logout() - .permitAll(); + .antMatchers("/css/**", "/js/**", "/images/**").permitAll() + .antMatchers("/login*").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") + .antMatchers("/user/new").access(" hasRole('ROLE_ADMIN')") + .antMatchers("/user/all*").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") + .antMatchers("/user/modify*").access("hasRole('ROLE_ADMIN')") + .antMatchers("/project/**").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") + .antMatchers("/api/**").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") + .antMatchers("/ticket/**").access("hasRole('ROLE_USER') or hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVELOPER') or hasRole('ROLE_APPROVER')") + .and() + .csrf().disable() + .formLogin() + .loginPage("/login") + .successForwardUrl("/api/user/dispatch") + .permitAll() + .and() + .logout() + .permitAll(); httpSecurity.userDetailsService(userService); } diff --git a/bugtracker/src/main/resources/application.properties b/bugtracker/src/main/resources/application.properties index 669653e..0c66d52 100644 --- a/bugtracker/src/main/resources/application.properties +++ b/bugtracker/src/main/resources/application.properties @@ -1,5 +1,5 @@ # ============================================================== -# = Data Source : TODO +# = Data Source # ============================================================== #spring.datasource.driver-class-name=com.mysql.jdbc.Driver #spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dbname?useSSL=false @@ -64,3 +64,5 @@ spring.jpa.hibernate.ddl-auto = update spring.resources.chain.cache=false +spring.resources.add-mappings=true + diff --git a/bugtracker/src/main/resources/static/css/styles.css b/bugtracker/src/main/resources/static/css/styles.css index e69de29..3c09235 100644 --- a/bugtracker/src/main/resources/static/css/styles.css +++ b/bugtracker/src/main/resources/static/css/styles.css @@ -0,0 +1,18 @@ +* { + +} + +div { + display: block; + border-style: solid; + border-width: 1px; + border-color: black; +} + +#maindiv { + /*height: 300px;*/ +} + +#menu { + +} \ No newline at end of file diff --git a/bugtracker/src/main/resources/templates/hello.html b/bugtracker/src/main/resources/templates/hello.html index 1430ab4..1d38e7d 100644 --- a/bugtracker/src/main/resources/templates/hello.html +++ b/bugtracker/src/main/resources/templates/hello.html @@ -3,8 +3,11 @@ xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"> Hello World! - - + + + + + @@ -34,7 +37,8 @@ layout: 'hbox', width: 300, margin: '0 0 10 0', - renderTo: Ext.getBody(), + //renderTo: Ext.getBody(), + renderTo: "menu", floating: false, items: [{ xtype: 'container', @@ -73,12 +77,15 @@ - -
- -

Hello [[${#httpServletRequest.remoteUser}]]!

- - - +
+