From 84cb6c51dc9632418f4f4194ad1c3a9f8f39f110 Mon Sep 17 00:00:00 2001 From: jendib Date: Thu, 15 Aug 2013 19:19:58 +0200 Subject: [PATCH] Update database version after upgrade, fix 403 detection on sharing app --- docs-core/src/main/resources/db/update/dbupdate-003-0.sql | 3 ++- docs-core/src/main/resources/db/update/dbupdate-004-0.sql | 3 ++- docs-web/src/main/webapp/app/share/controller/Share.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs-core/src/main/resources/db/update/dbupdate-003-0.sql b/docs-core/src/main/resources/db/update/dbupdate-003-0.sql index 84e042c1..1d05a145 100644 --- a/docs-core/src/main/resources/db/update/dbupdate-003-0.sql +++ b/docs-core/src/main/resources/db/update/dbupdate-003-0.sql @@ -1 +1,2 @@ -insert into T_ROLE(ROL_ID_C, ROL_NAME_C, ROL_CREATEDATE_D) values('user', 'User', NOW()); \ No newline at end of file +insert into T_ROLE(ROL_ID_C, ROL_NAME_C, ROL_CREATEDATE_D) values('user', 'User', NOW()); +update T_CONFIG set CFG_VALUE_C='3' where CFG_ID_C='DB_VERSION'; diff --git a/docs-core/src/main/resources/db/update/dbupdate-004-0.sql b/docs-core/src/main/resources/db/update/dbupdate-004-0.sql index d0e47cd7..08bd0ede 100644 --- a/docs-core/src/main/resources/db/update/dbupdate-004-0.sql +++ b/docs-core/src/main/resources/db/update/dbupdate-004-0.sql @@ -1 +1,2 @@ -create cached table T_SHARE ( SHA_ID_C varchar(36) not null, SHA_NAME_C varchar(36), SHA_IDDOCUMENT_C varchar(36) not null, SHA_CREATEDATE_D datetime, SHA_DELETEDATE_D datetime, primary key (SHA_ID_C) ); \ No newline at end of file +create cached table T_SHARE ( SHA_ID_C varchar(36) not null, SHA_NAME_C varchar(36), SHA_IDDOCUMENT_C varchar(36) not null, SHA_CREATEDATE_D datetime, SHA_DELETEDATE_D datetime, primary key (SHA_ID_C) ); +update T_CONFIG set CFG_VALUE_C='4' where CFG_ID_C='DB_VERSION'; diff --git a/docs-web/src/main/webapp/app/share/controller/Share.js b/docs-web/src/main/webapp/app/share/controller/Share.js index 254e439f..9ecbcdee 100644 --- a/docs-web/src/main/webapp/app/share/controller/Share.js +++ b/docs-web/src/main/webapp/app/share/controller/Share.js @@ -9,7 +9,7 @@ App.controller('Share', function($scope, $state, $stateParams, Restangular) { .then(function (data) { $scope.document = data; }, function (response) { - if (response.data.status == 403) { + if (response.status == 403) { $state.transitionTo('403'); } });