Commit 0838d1bf authored by Andrey Lugovskiy's avatar Andrey Lugovskiy
Browse files

Merge branch 'fix-liquibase-after-last-merge' into 'master'

- fix liquibase

See merge request !72
parents fc343344 49e5dbae
......@@ -341,6 +341,7 @@ public class DatasetServiceImpl implements DatasetService {
target.setRights(source.getRights());
target.setSource(source.getSource());
target.setDateCreateDocument(source.getDateCreateDocument());
target.setOwner(source.getOwner());
// target.setVersionTag(source.getVersionTag());
// target.setDescriptors(source.getDescriptors());
}
......
......@@ -44,6 +44,7 @@
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<webApp>
<baseResource implementation="org.eclipse.jetty.util.resource.ResourceCollection">
<resourcesAsCSV>src/main/webapp</resourcesAsCSV>
......
......@@ -27,6 +27,7 @@ import org.springframework.security.config.annotation.web.configuration.EnableWe
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
@Configuration
@EnableWebSecurity
......@@ -47,10 +48,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(final HttpSecurity http) throws Exception {
http
.csrf().disable()
// No JSESSIONID in URL
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
// Authorizations
.sessionManagement().enableSessionUrlRewriting(false) // Authorizations
.and().authorizeRequests()
// Rules
.antMatchers("/user/login").permitAll()
......@@ -61,6 +60,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// access denied
.accessDeniedPage("/user/login?authorization_error=true")
.and()
.csrf().requireCsrfProtectionMatcher(new AntPathRequestMatcher("/oauth/authorize")).disable()
// Logout and login
.logout()
.logoutUrl("/logout")
......
......@@ -2698,18 +2698,84 @@ databaseChangeLog:
author: matijaobreza
comment: Migrate ACL to app-blocks-1.3-SNAPSHOT
changes:
- preConditions:
- onFail: continue
- foreignKeyConstraintExists:
foreignKeyName: FK_fhuoesmjef3mrv0gpja4shvcr
foreignKeyTableName: acl_entry
- dropForeignKeyConstraint:
baseTableName: acl_entry
constraintName: FK_fhuoesmjef3mrv0gpja4shvcr
- changeSet:
id: 1509390480000-2
author: matijaobreza
comment: Migrate ACL to app-blocks-1.3-SNAPSHOT
changes:
- preConditions:
- onFail: continue
- foreignKeyConstraintExists:
foreignKeyName: FK_i6xyfccd4y3wlwhgwpo4a9rm1
foreignKeyTableName: acl_entry
- dropForeignKeyConstraint:
baseTableName: acl_entry
constraintName: FK_i6xyfccd4y3wlwhgwpo4a9rm1
- changeSet:
id: 1509390480000-3
author: matijaobreza
comment: Migrate ACL to app-blocks-1.3-SNAPSHOT
changes:
- preConditions:
- onFail: continue
- foreignKeyConstraintExists:
foreignKeyName: FK_nxv5we2ion9fwedbkge7syoc3
foreignKeyTableName: acl_entry
- dropForeignKeyConstraint:
baseTableName: acl_object_identity
constraintName: FK_nxv5we2ion9fwedbkge7syoc3
- dropUniqueConstraint:
tableName: acl_entry
- changeSet:
id: 1509390480000-4
author: matijaobreza
comment: Migrate ACL to app-blocks-1.3-SNAPSHOT
changes:
- preConditions:
- onFail: continue
- foreignKeyConstraintExists:
foreignKeyName: UK_gh5egfpe4gaqokya6s0567b0l
foreignKeyTableName: acl_entry
- dropForeignKeyConstraint:
baseTableName: acl_entry
constraintName: UK_gh5egfpe4gaqokya6s0567b0l
- changeSet:
id: 1509390480000-5
author: matijaobreza
comment: Migrate ACL to app-blocks-1.3-SNAPSHOT
changes:
- preConditions:
- onFail: continue
- indexExists:
indexName: UK_9n8jn20f8vcc1jg2i59x6b2ci
tableName: oauthclient
- dropIndex:
tableName: oauthclient
indexName: UK_9n8jn20f8vcc1jg2i59x6b2ci
- changeSet:
id: 1509390480000-6
author: matijaobreza
comment: Migrate ACL to app-blocks-1.3-SNAPSHOT
changes:
- preConditions:
- onFail: continue
- foreignKeyConstraintExists:
foreignKeyName: FK_m2da63y1tfs7mmuv9rht8udt7
foreignKeyTableName: clientrole
- dropForeignKeyConstraint:
baseTableName: clientrole
constraintName: FK_m2da63y1tfs7mmuv9rht8udt7
- changeSet:
id: 1509390480000-7
author: matijaobreza
comment: Migrate ACL to app-blocks-1.3-SNAPSHOT
changes:
- renameTable:
oldTableName: acl_sid
newTableName: acl_sid_backup
......@@ -2903,16 +2969,16 @@ databaseChangeLog:
join acl_sid_backup oldsid on oldsid.id=oid.owner_sid
join acl_sid newsid on newsid.sid=oldsid.sid
set oid.owner_sid=newsid.id
- addForeignKeyConstraint:
baseColumnNames: owner_sid
baseTableName: acl_object_identity
constraintName: FK_nxv5we2ion9fwedbkge7syoc3
deferrable: false
initiallyDeferred: false
onDelete: NO ACTION
onUpdate: NO ACTION
referencedColumnNames: id
referencedTableName: acl_sid
# - addForeignKeyConstraint:
# baseColumnNames: owner_sid
# baseTableName: acl_object_identity
# constraintName: FK_nxv5we2ion9fwedbkge7syoc3
# deferrable: false
# initiallyDeferred: false
# onDelete: NO ACTION
# onUpdate: NO ACTION
# referencedColumnNames: id
# referencedTableName: acl_sid
# Migrate acl_sid_backup data for authorities (roles) -- i.e. everything that has not moved
- sql:
comment: Delete invalid authority records from acl_sid_backup (users and oauthclients)
......@@ -2941,8 +3007,6 @@ databaseChangeLog:
from acl_entry_backup e
inner join acl_sid_backup oldsid on oldsid.id=e.sid
inner join acl_sid newsid on newsid.sid=oldsid.sid;
- dropTable:
tableName: acl_sid_backup
- dropTable:
tableName: acl_entry_backup
# Activate FK constraints
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment