Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion registry-public/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: registry-public
version: '4.27.0'
version: '4.27.1'
synopsis: Registry Public
description: Registry Public
category: Web
Expand Down
2 changes: 1 addition & 1 deletion registry-server/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: registry-server
version: '4.27.0'
version: '4.27.1'
synopsis: Engine Registry
description: Engine Registry
category: Web
Expand Down
2 changes: 1 addition & 1 deletion registry-server/src/Registry/Api/Handler/Swagger/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ swagger =
s._swaggerInfo
{ _infoTitle = "Registry API"
, _infoDescription = Just "API specification for Registry"
, _infoVersion = "4.27.0"
, _infoVersion = "4.27.1"
, _infoLicense =
Just $
License
Expand Down
2 changes: 1 addition & 1 deletion shared-common/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: shared-common
version: '4.27.0'
version: '4.27.1'
synopsis: Engine Shared
description: Engine Shared
category: Web
Expand Down
2 changes: 1 addition & 1 deletion wizard-public/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wizard-public
version: '4.27.0'
version: '4.27.1'
synopsis: Wizard Public
description: Wizard Public
category: Web
Expand Down
2 changes: 1 addition & 1 deletion wizard-server/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: wizard-server
version: '4.27.0'
version: '4.27.1'
synopsis: Engine Wizard
description: Engine Wizard
category: Web
Expand Down
2 changes: 1 addition & 1 deletion wizard-server/src/Wizard/Api/Handler/Swagger/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ swagger =
s._swaggerInfo
{ _infoTitle = "Wizard API"
, _infoDescription = Just "API specification for Wizard"
, _infoVersion = "4.27.0"
, _infoVersion = "4.27.1"
, _infoLicense =
Just $
License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ userAlbert =
, "PRJ_FILE_PERM"
, "PRJ_ACTION_PERM"
, "PRJ_IMPORTER_PERM"
, "PJR_TML_PERM"
, "PRJ_TML_PERM"
, "DOC_TML_READ_PERM"
, "CFG_PERM"
, "SUBM_PERM"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ userNikola =
, "PRJ_PERM"
, "PRJ_ACTION_PERM"
, "PRJ_IMPORTER_PERM"
, "PJR_TML_PERM"
, "PRJ_TML_PERM"
, "DOC_TML_READ_PERM"
, "SUBM_PERM"
, "DOC_TML_WRITE_PERM"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ userSystem =
, "PRJ_FILE_PERM"
, "PRJ_ACTION_PERM"
, "PRJ_IMPORTER_PERM"
, "PJR_TML_PERM"
, "PRJ_TML_PERM"
, "DOC_TML_READ_PERM"
, "CFG_PERM"
, "SUBM_PERM"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import qualified Wizard.Database.Migration.Production.Migration_0060_knowledgeMo
import qualified Wizard.Database.Migration.Production.Migration_0061_news.Migration as M_0061
import qualified Wizard.Database.Migration.Production.Migration_0062_metamodelFix.Migration as M_0062
import qualified Wizard.Database.Migration.Production.Migration_0063_plugins.Migration as M_0063
import qualified Wizard.Database.Migration.Production.Migration_0064_prjTmpPerm.Migration as M_0064

migrationDefinitions :: [MigrationDefinition]
migrationDefinitions =
Expand Down Expand Up @@ -131,4 +132,5 @@ migrationDefinitions =
, M_0061.definition
, M_0062.definition
, M_0063.definition
, M_0064.definition
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module Wizard.Database.Migration.Production.Migration_0064_prjTmpPerm.Migration (
definition,
) where

import Control.Monad.Logger
import Control.Monad.Reader (liftIO)
import Data.Pool (Pool, withResource)
import Database.PostgreSQL.Migration.Entity
import Database.PostgreSQL.Simple

definition = (meta, migrate)

meta = MigrationMeta {mmNumber = 64, mmName = "Fix Project Template Permissions", mmDescription = "Fix the project template permissions in the user_entity table."}

migrate :: Pool Connection -> LoggingT IO (Maybe Error)
migrate dbPool = do
let sql =
"UPDATE user_entity \
\SET permissions = array_replace(permissions, 'PJR_TML_PERM', 'PRJ_TML_PERM') \
\WHERE 'PJR_TML_PERM' = ANY(permissions);"
let action conn = execute_ conn sql
liftIO $ withResource dbPool action
return Nothing
4 changes: 2 additions & 2 deletions wizard-server/src/Wizard/Model/Config/ServerConfigDM.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ defaultRoles =
, "PRJ_ACTION_PERM"
, "PRJ_FILE_PERM"
, "PRJ_IMPORTER_PERM"
, "PJR_TML_PERM"
, "PRJ_TML_PERM"
, "DOC_TML_READ_PERM"
, "CFG_PERM"
, "SUBM_PERM"
Expand All @@ -77,7 +77,7 @@ defaultRoles =
, "PRJ_PERM"
, "PRJ_ACTION_PERM"
, "PRJ_IMPORTER_PERM"
, "PJR_TML_PERM"
, "PRJ_TML_PERM"
, "DOC_TML_READ_PERM"
, "SUBM_PERM"
, "DOC_TML_WRITE_PERM"
Expand Down
Loading