diff --git a/.gitignore b/.gitignore
index 0ef4d78b804..d972aa8ead4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -302,16 +302,6 @@ src/AltinnRepositories/gitea-data/gitea/*
src/Altinn.Platform/Altinn.Platform.Receipt/Receipt/wwwroot/receipt/js/react
src/Altinn.Platform/Altinn.Platform.Receipt/Receipt/wwwroot/receipt/css
-######### Built react apps for designer ###########
-src/studio/src/designer/backend/wwwroot/designer/css/react
-src/studio/src/designer/backend/wwwroot/designer/js/react
-src/studio/src/designer/backend/wwwroot/designer/js/lib
-src/studio/src/designer/backend/wwwroot/designer/css/lib
-src/studio/src/designer/backend/wwwroot/designer/css/font-awesome
-src/studio/src/designer/backend/wwwroot/designer/css/fonts
-src/studio/src/designer/backend/wwwroot/designer/css/bootstrap*.css
-src/studio/src/designer/backend/wwwroot/designer/frontend
-
######### Testdata created by testrun #########
src/Altinn.Platform/Altinn.Platform.Authorization/IntegrationTests/Data/blobs/output/
@@ -378,16 +368,6 @@ backend/tests/Designer.Tests/_TestData/Remote/**/test-repo-*/**
backend/tests/Designer.Tests/_TestData/Repositories/**/**/test-repo_*/**
backend/tests/Designer.Tests/_TestData/Remote/**/test-repo_*/**
-######### Built react apps for designer ###########
-backend/src/Designer/wwwroot/designer/css/react
-backend/src/Designer/wwwroot/designer/js/react
-backend/src/Designer/wwwroot/designer/js/lib
-backend/src/Designer/wwwroot/designer/css/lib
-backend/src/Designer/wwwroot/designer/css/font-awesome
-backend/src/Designer/wwwroot/designer/css/fonts
-backend/src/Designer/wwwroot/designer/css/bootstrap*.css
-backend/src/Designer/wwwroot/designer/frontend
-
**/.env
src/studio/.devcontainer/**
diff --git a/Dockerfile b/Dockerfile
index a4bc9393e7f..d35b76def51 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -27,7 +27,6 @@ COPY ./frontend/resourceadm/package.json ./frontend/resourceadm/
COPY ./frontend/resourceadm/testing/playwright/package.json ./frontend/resourceadm/testing/playwright/
COPY ./frontend/studio-root/package.json ./frontend/studio-root/
COPY ./frontend/testing/cypress/package.json ./frontend/testing/cypress/
-COPY ./frontend/testing/mockend/package.json ./frontend/testing/mockend/
COPY ./frontend/testing/playwright/package.json ./frontend/testing/playwright/
RUN yarn --immutable
@@ -64,7 +63,6 @@ COPY --from=generate-studio-frontend /build/frontend/dist/app-development ./wwwr
COPY --from=generate-studio-frontend /build/frontend/dist/app-preview ./wwwroot/designer/frontend/app-preview
COPY --from=generate-studio-frontend /build/frontend/dist/dashboard ./wwwroot/designer/frontend/dashboard
COPY --from=generate-studio-frontend /build/frontend/dist/resourceadm ./wwwroot/designer/frontend/resourceadm
-COPY --from=generate-studio-frontend /build/frontend/dist/language ./wwwroot/designer/frontend/lang
COPY --from=generate-studio-frontend /build/frontend/dist/studio-root ./wwwroot/designer/frontend/studio-root
COPY --from=generate-studio-backend /version/version.json ./wwwroot/designer/version.json
diff --git a/backend/src/Designer/Authorization/NotAuthorizedHandler.cs b/backend/src/Designer/Authorization/NotAuthorizedHandler.cs
deleted file mode 100644
index ee9cee7f4fe..00000000000
--- a/backend/src/Designer/Authorization/NotAuthorizedHandler.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using Microsoft.AspNetCore.Authentication;
-using Microsoft.AspNetCore.Authentication.Cookies;
-
-namespace Altinn.Studio.Designer.Authorization
-{
- ///
- /// This handler is called by the authentication/Authorization framework when user is redirected by a authorization
- /// handler
- ///
- public static class NotAuthorizedHandler
- {
- ///
- /// Redirects user to the correct page depending if the not authorized is caused by not having
- /// the needed rights or not having the correct authentication level
- /// for details
- ///
- /// The context
- /// A async task
- public static async Task RedirectToNotAuthorized(RedirectContext context)
- {
- if (context.HttpContext.Items["upgrade"] != null)
- {
- bool requireUpgrade = (bool)context.HttpContext.Items["upgrade"];
- if (requireUpgrade)
- {
- int requiredAuthenticationLevel = Convert.ToInt32(context.HttpContext.Items["requiredLevel"]);
- context.Response.Redirect("/Home/UpgradeAuthentication/" + requiredAuthenticationLevel);
- }
- else
- {
- context.Response.Redirect("/Home/NotAuthorized/");
- }
- }
-
- await Task.CompletedTask;
- }
- }
-}
diff --git a/backend/src/Designer/Authorization/actionoptions.json b/backend/src/Designer/Authorization/actionoptions.json
deleted file mode 100644
index 9f65cf39e30..00000000000
--- a/backend/src/Designer/Authorization/actionoptions.json
+++ /dev/null
@@ -1,16 +0,0 @@
-[
- {
- "ActionId": "read",
- "ActionTitle": "Les",
-
- },
- {
- "ActionId": "write",
- "ActionTitle": "Skriv"
-
- },
- {
- "ActionId": "delete",
- "ActionTitle": "Slett"
- }
-]
diff --git a/backend/src/Designer/Authorization/subjectoptions.json b/backend/src/Designer/Authorization/subjectoptions.json
deleted file mode 100644
index fa80e04cb42..00000000000
--- a/backend/src/Designer/Authorization/subjectoptions.json
+++ /dev/null
@@ -1,14 +0,0 @@
-[
- {
- "SubjectId": "dagl",
- "SubjectSource": "altinn:rolecode",
- "SubjectTitle": "Daglig leder",
- "SubjectDescription": "Daglig leder fra enhetsregisteret"
- },
- {
- "SubjectId": "lede",
- "SubjectSource": "altinn:rolecode",
- "SubjectTitle": "Styreleder",
- "SubjectDescription": "Styreleder leder fra enhetsregisteret"
- }
-]
diff --git a/backend/src/Designer/Configuration/ServiceRepositorySettings.cs b/backend/src/Designer/Configuration/ServiceRepositorySettings.cs
index ab9bff10d3c..b7cac0ce397 100644
--- a/backend/src/Designer/Configuration/ServiceRepositorySettings.cs
+++ b/backend/src/Designer/Configuration/ServiceRepositorySettings.cs
@@ -1,9 +1,6 @@
-using System.Collections.Generic;
using System.IO;
using Altinn.Studio.Designer.Configuration.Marker;
using Altinn.Studio.Designer.Helpers.Extensions;
-using Altinn.Studio.Designer.Models;
-using Newtonsoft.Json;
namespace Altinn.Studio.Designer.Configuration
{
@@ -12,21 +9,6 @@ namespace Altinn.Studio.Designer.Configuration
///
public class ServiceRepositorySettings : ISettingsMarker
{
- ///
- /// Constant for the location of resource files
- ///
- public const string RESOURCE_FOLDER_NAME = "Resources/";
-
- ///
- /// Constant for the location of language resource files
- ///
- public const string UI_RESOURCE_FOLDER_NAME = "App/ui/";
-
- ///
- /// Constant for the location of form layouts
- ///
- public const string FORMLAYOUTS_RESOURCE_FOLDER_NAME = "layouts/";
-
///
/// Constant for the location of language resource files
///
@@ -37,51 +19,6 @@ public class ServiceRepositorySettings : ISettingsMarker
///
public const string CONFIG_FOLDER_PATH = "App/config/";
- ///
- /// Constant for the location of implementation files
- ///
- public const string IMPLEMENTATION_FOLDER_NAME = "Implementation/";
-
- ///
- /// Constant for the location of dynamics files
- ///
- public const string DYNAMICS_FOLDER_NAME = "Dynamics/";
-
- ///
- /// Constant for the location of calculation files
- ///
- public const string CALCULATION_FOLDER_NAME = "App/logic/Calculation/";
-
- ///
- /// Constant for the location of validation files
- ///
- public const string VALIDATION_FOLDER_NAME = "App/logic/Validation/";
-
- ///
- /// Constant for the name of rule configuration file
- ///
- public const string RULE_CONFIG_FILE_NAME = "RuleConfiguration.json";
-
- ///
- /// Constant for the name of the layout setting file
- ///
- public const string LAYOUT_SETTING_FILE = "Settings.json";
-
- ///
- /// Constant for the location of app logic files
- ///
- public const string APPLOGIC_FOLDER_NAME = "App/logic/";
-
- ///
- /// Constant for the location of the testdata for parties folder
- ///
- public const string TESTDATA_FOR_PARTY_FOLDER_NAME = "Testdataforparty/";
-
- ///
- /// Constant for the location of service tests
- ///
- public const string TEST_FOLDER_NAME = "Test/";
-
///
/// Constant for the location of service deployment charts
///
@@ -92,60 +29,21 @@ public class ServiceRepositorySettings : ISettingsMarker
///
public const string APP_FOLDER_NAME = "App/";
- ///
- /// Constant for the location of service intergrationtests charts
- ///
- public const string INTERGRATIONTESTS_FOLDER_NAME = "App.IntegrationTests/";
-
- ///
- /// Constant for the service binaries
- ///
- public const string BINARY_FOLDER_NAME = "bin/";
-
- ///
- /// Constant for the location of org level text resources
- ///
- public const string TEXTRESOURCE_ORG_FOLDER_NAME = "text/";
-
- ///
- /// Constant for the location of org level text resources
- ///
- public const string TEXTRESOURCE_COMMON_FOLDER_NAME = "altinn/common/text/";
-
///
/// Constant for the location of widgets
///
public const string WIDGETS_FOLDER_NAME = "widgets/";
- ///
- /// Constant for the location of app metadata
- ///
- public const string MODEL_METADATA_FOLDER_PATH = "App/models/";
-
- private const string PACKAGES_LOCATION = "Packages/";
- private const string TEMP_LOCATION = "Temp/";
- private const string TESTDATA_FOLDER_NAME = "Data/";
-
///
/// constant for the location of authorization policies
///
public const string AUTHORIZATION_FOLDER_NAME = "App/config/authorization/";
- ///
- /// Constant for the location of service metadata file
- ///
- public const string METADATA_FILENAME = "ServiceMetadata.json";
-
///
/// Gets or sets the Repository Location
///
public string RepositoryLocation { get; set; }
- ///
- /// Gets or sets a value indicating if runtime should fetch app information from database or from disk
- ///
- public bool ShouldFetchFromDatabase { get; set; }
-
///
/// Gets or sets the url for the API Endpoint
///
@@ -176,126 +74,11 @@ public class ServiceRepositorySettings : ISettingsMarker
///
public string BaseResourceFolderContainer { get; set; }
- ///
- /// Gets or sets The name of the ServiceModel file Name
- ///
- public string ServiceModelFileName { get; set; } = "ServiceModel.cs";
-
- ///
- /// Gets or sets The name of the ServiceModel xsd file Name
- ///
- public string ServiceModelXSDFileName { get; set; } = "ServiceModel.xsd";
-
- ///
- /// Gets or sets The name of the ServiceModel json schema jsd file Name
- ///
- public string ServiceModelJsonSchemaFileName { get; set; } = "ServiceModel.schema.json";
-
- ///
- /// Gets or sets The name of the FormLayout json file Name
- ///
- public string FormLayoutJSONFileName { get; set; } = Path.Combine(UI_RESOURCE_FOLDER_NAME, "FormLayout.json");
-
- ///
- /// Gets or sets The name of the ThirdPartyComponents json file Name
- ///
- public string ThirdPartyComponentsJSONFileName { get; set; } = Path.Combine(RESOURCE_FOLDER_NAME, "ThirdPartyComponents.json");
-
- ///
- /// Gets or sets The ServiceMetadata file name
- ///
- public string ServiceMetadataFileName { get; set; } = METADATA_FILENAME;
-
- ///
- /// Gets or sets the filename for application meta data
- ///
- public string ApplicationMetadataFileName { get; set; } = "applicationmetadata.json";
-
- ///
- /// Gets or sets the filename for process file
- ///
- public string ProcessFileName { get; set; } = "process.bpmn";
-
- ///
- /// Gets or sets React file name
- ///
- public string RuntimeAppFileName { get; set; } = "runtime.js";
-
- ///
- /// Gets or sets React CSS file name
- ///
- public string RuntimeCssFileName { get; set; } = "runtime.css";
-
- ///
- /// Gets or sets styles config file name for the app.
- ///
- public string ServiceStylesConfigFileName { get; set; } = "Styles.json";
-
- ///
- /// Gets or sets config file name for the app.
- ///
- public string ServiceConfigFileName { get; set; } = "config.json";
-
- ///
- /// Gets or sets default Bootstrap url
- ///
- public string DefaultBootstrapUrl { get; set; } = "https://altinncdn.no/toolkits/bootstrap/4.5.2/css/bootstrap.min.css";
-
- ///
- /// Gets or sets the filename for app implementation
- ///
- public string AppImplementationFileName { get; set; } = "App.cs";
-
- ///
- /// Gets or sets the filename for calculation handler
- ///
- public string CalculationHandlerFileName { get; set; } = "CalculationHandler.cs";
-
- ///
- /// Gets or sets the filename for the validation handler
- ///
- public string ValidationHandlerFileName { get; set; } = "ValidationHandler.cs";
-
- ///
- /// Gets or sets the filename for the instantiation handler
- ///
- public string InstantiationHandlerFileName { get; set; } = "InstantiationHandler.cs";
-
- ///
- /// Gets or sets the filename for the instantiation handler
- ///
- public string RuleHandlerFileName { get; set; } = "RuleHandler.js";
-
- ///
- /// Gets or sets the filename for the default service layout
- ///
- public string DefaultLayoutFileName { get; set; } = "_ServiceLayout.cshtml";
-
- ///
- /// Gets or sets the filename for the default view start file
- ///
- public string DefaultViewStartFileName { get; set; } = "_ViewStart.cshtml";
-
- ///
- /// Gets or sets the filename for the default view imports file
- ///
- public string DefaultViewImportsFileName { get; set; } = "_ViewImports.cshtml";
-
- ///
- /// Gets or sets the filename for the rules file
- ///
- public string RulesFileName { get; set; } = "Rules.json";
-
///
/// Gets or sets the filename for the Dockerfile file
///
public string DockerfileFileName { get; set; } = "Dockerfile";
- ///
- /// Gets or sets the filename for the altinn service project
- ///
- public string ProjectFileName { get; set; } = "AltinnService.csproj";
-
///
/// Gets or sets the filename for the git ignore file
///
@@ -321,20 +104,6 @@ public class ServiceRepositorySettings : ISettingsMarker
///
public string WidgetSettingsFileName { get; set; } = "widgetSettings.json";
- ///
- /// Gets the styles config element
- ///
- public string GetStylesConfig()
- {
- StylesConfig stylesConfig = new StylesConfig();
- stylesConfig.InternalStyles = new List();
- stylesConfig.InternalStyles.Add(RuntimeCssFileName);
- stylesConfig.ExternalStyles = new List();
- stylesConfig.ExternalStyles.Add(DefaultBootstrapUrl);
-
- return JsonConvert.SerializeObject(stylesConfig);
- }
-
///
/// Gets the full path to the org directory
///
@@ -365,138 +134,6 @@ public string GetServicePath(string org, string app, string developer = null)
return Path.Combine(RepositoryLocation, developer ?? string.Empty, org ?? string.Empty, app ?? string.Empty);
}
- ///
- /// Gets the full path to the testdata for party directory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// The current user, app developer.
- /// The full path, ending with "/"
- public string GetTestdataForPartyPath(string org, string app, string developer = null)
- {
- org = org.AsFileName();
- app = app.AsFileName();
- developer = developer.AsFileName();
-
- return Path.Combine(RepositoryLocation, developer, org, app, TESTDATA_FOR_PARTY_FOLDER_NAME);
- }
-
- ///
- /// Method that returns the path to the form layout file in the old format
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// The current developer
- /// The full path, ending with "/"
- public string GetOldFormLayoutPath(string org, string app, string developer)
- {
- org = org.AsFileName();
- app = app.AsFileName();
- developer = developer.AsFileName();
- return Path.Combine(RepositoryLocation, developer, org, app, FormLayoutJSONFileName);
- }
-
- ///
- /// Method that returns the path to the a specific form layout
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// The current developer
- /// The form layout name
- /// The full path, ending with "/"
- public string GetFormLayoutPath(string org, string app, string developer, string formLayout)
- {
- org = org.AsFileName();
- app = app.AsFileName();
- developer = developer.AsFileName();
- formLayout = formLayout.AsFileName();
- return Path.Combine(RepositoryLocation, developer, org, app, UI_RESOURCE_FOLDER_NAME, FORMLAYOUTS_RESOURCE_FOLDER_NAME, $"{formLayout}.json");
- }
-
- ///
- /// Method that returns the path to the form layouts folder
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// The current developer
- /// The full path, ending with "/"
- public string GetFormLayoutsPath(string org, string app, string developer)
- {
- org = org.AsFileName();
- app = app.AsFileName();
- developer = developer.AsFileName();
- return Path.Combine(RepositoryLocation, developer ?? string.Empty, org, app, UI_RESOURCE_FOLDER_NAME, FORMLAYOUTS_RESOURCE_FOLDER_NAME);
- }
-
- ///
- /// Get the path to rule handler file
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetRuleHandlerPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), UI_RESOURCE_FOLDER_NAME, RuleHandlerFileName);
- }
-
- ///
- /// Get name of the rule configuration file.
- ///
- /// The name of the file.
- public string GetRuleConfigFileName()
- {
- return RULE_CONFIG_FILE_NAME;
- }
-
- ///
- /// Gets the full path to the directory where all service packages will be placed
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetServicePackagesPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), PACKAGES_LOCATION);
- }
-
- ///
- /// Gets the full path to a directory which can be used for temporary storage (for instance during service packaging)
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetTemporaryPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), TEMP_LOCATION);
- }
-
- ///
- /// Gets the full path to ResourceDirectory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetResourcePath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), RESOURCE_FOLDER_NAME);
- }
-
- ///
- /// Gets the full path to Rule configuration file
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetRuleConfigPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), UI_RESOURCE_FOLDER_NAME, RULE_CONFIG_FILE_NAME);
- }
-
///
/// Gets the full path to ResourceDirectory
///
@@ -509,78 +146,6 @@ public string GetLanguageResourcePath(string org, string app, string developer)
return Path.Combine(GetServicePath(org, app, developer), CONFIG_FOLDER_PATH, LANGUAGE_RESOURCE_FOLDER_NAME);
}
- ///
- /// Gets the full path to applicationmetadata.jons
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetAppMetadataFilePath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), CONFIG_FOLDER_PATH, ApplicationMetadataFileName);
- }
-
- ///
- /// Gets the full path to Dynamics directory (within ResourcesDirecory)
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetDynamicsPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), RESOURCE_FOLDER_NAME, DYNAMICS_FOLDER_NAME);
- }
-
- ///
- /// Gets the full path to Calculation directory (within ImplementationDirectory)
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path to the calculation folder, ending with '/'
- public string GetCalculationPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), CALCULATION_FOLDER_NAME);
- }
-
- ///
- /// Gets the full path to Validation directory (within ImplementationDirectory)
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path to the validation folder, ending with '/'
- public string GetValidationPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), VALIDATION_FOLDER_NAME);
- }
-
- ///
- /// Gets the full path to InstantiationHandler.cs
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path to the validation folder, ending with '/'
- public string GetAppLogicPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), APPLOGIC_FOLDER_NAME);
- }
-
- ///
- /// Gets the full path to TestDirectory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetTestPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), TEST_FOLDER_NAME);
- }
-
///
/// Gets the full path to deployment directory
///
@@ -599,171 +164,11 @@ public string GetAppFolderName()
return APP_FOLDER_NAME;
}
- ///
- /// Gets the full path to integration tests directory
- ///
- /// The full path, ending with "/"
- public string GetIntegrationTestsFolderName()
- {
- return INTERGRATIONTESTS_FOLDER_NAME;
- }
-
///
/// Gets or sets the filename for the App.Sln file
///
public string AppSlnFileName { get; set; } = "App.sln";
- ///
- /// Gets The full path to TestDataDirectory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetTestDataPath(string org, string app, string developer)
- {
- return Path.Combine(GetTestPath(org, app, developer), TESTDATA_FOLDER_NAME);
- }
-
- ///
- /// Gets The full path to Metadata directory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetMetadataPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), MODEL_METADATA_FOLDER_PATH);
- }
-
- ///
- /// Get Resource Folder name
- ///
- /// The resource folder
- public string GetResourceFolder()
- {
- return RESOURCE_FOLDER_NAME;
- }
-
- ///
- /// Get Implementation Folder name
- ///
- /// The implementation folder
- public string GetImplementationFolder()
- {
- return IMPLEMENTATION_FOLDER_NAME;
- }
-
- ///
- /// Returns the Metadata folder name
- ///
- /// The metadata folder
- public string GetMetadataFolder()
- {
- return MODEL_METADATA_FOLDER_PATH;
- }
-
- ///
- /// Returns the Metadata file name
- ///
- /// The metadata file name
- public string GetMetadataJsonFile()
- {
- return METADATA_FILENAME;
- }
-
- ///
- /// Get binary folder name
- ///
- /// The binary folder
- public string GetBinaryFolder()
- {
- return BINARY_FOLDER_NAME;
- }
-
- ///
- /// Gets the full path to model directory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetModelPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), "App/models/");
- }
-
- ///
- /// Gets the full path to the implementation directory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetImplementationPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), "Implementation/");
- }
-
- ///
- /// Gets the full path to the Authorization directory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path to the Authorization directory, ending with "/"
- public string GetAuthorizationPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), "Authorization/");
- }
-
- ///
- /// Gets the full path to the rules directory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app.
- /// The full path, ending with "/"
- public string GetRulesPath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), "Rules/");
- }
-
- ///
- /// Gets the full path to the data source directory
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// the developer for the current app
- /// The full path, ending with "/"
- public string GetDataSourcePath(string org, string app, string developer)
- {
- return Path.Combine(GetServicePath(org, app, developer), "DataSource/");
- }
-
- ///
- /// Gets the path to text resources in organisation level
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// The current user, app developer
- /// The path to text resources in organisation level, ending with "/"
- public string GetOrgTextResourcePath(string org, string developer)
- {
- return Path.Combine(GetOrgPath(org, developer), TEXTRESOURCE_ORG_FOLDER_NAME);
- }
-
- ///
- /// Gets the path to common text resources in altinn
- ///
- /// The current user, app developer.
- /// The path to common text resources in altinn, ending with "/"
- public string GetCommonTextResourcePath(string developer)
- {
- developer = developer.AsFileName();
- return Path.Combine(RepositoryLocation, developer, TEXTRESOURCE_COMMON_FOLDER_NAME);
- }
-
///
/// Gets the path to widgets in app repo
///
diff --git a/backend/src/Designer/Controllers/AppDevelopmentController.cs b/backend/src/Designer/Controllers/AppDevelopmentController.cs
index adfdcefe176..29c1c2afac5 100644
--- a/backend/src/Designer/Controllers/AppDevelopmentController.cs
+++ b/backend/src/Designer/Controllers/AppDevelopmentController.cs
@@ -64,6 +64,7 @@ public async Task Index(string org, string app)
{
await _sourceControl.VerifyCloneExists(org, app);
ViewBag.AiConnectionString = _applicationInsightsSettings.ConnectionString;
+ ViewBag.App = "app-development";
return View();
}
diff --git a/backend/src/Designer/Controllers/HomeController.cs b/backend/src/Designer/Controllers/HomeController.cs
index baddc6b2b95..ab62df21501 100644
--- a/backend/src/Designer/Controllers/HomeController.cs
+++ b/backend/src/Designer/Controllers/HomeController.cs
@@ -79,6 +79,7 @@ public async Task StartPage()
public IActionResult Index()
{
ViewBag.AiConnectionString = _applicationInsightsSettings.ConnectionString;
+ ViewBag.App = "studio-root";
return View();
}
@@ -92,34 +93,8 @@ public IActionResult Index()
public ActionResult Dashboard()
{
ViewBag.AiConnectionString = _applicationInsightsSettings.ConnectionString;
- return View("Dashboard");
- }
-
- ///
- /// Action for presenting the Not Authorized View
- ///
- /// The view telling user that user was not authorized
- public IActionResult NotAuthorized()
- {
- return View();
- }
-
- ///
- /// Action for presenting documentation
- ///
- /// The Doc view
- public IActionResult Docs()
- {
- return View();
- }
-
- ///
- /// Action for presenting error
- ///
- /// The Error view
- public IActionResult Error()
- {
- return View();
+ ViewBag.App = "dashboard";
+ return View("Index");
}
///
diff --git a/backend/src/Designer/Controllers/PreviewController.cs b/backend/src/Designer/Controllers/PreviewController.cs
index 63978096f8b..88976863f49 100644
--- a/backend/src/Designer/Controllers/PreviewController.cs
+++ b/backend/src/Designer/Controllers/PreviewController.cs
@@ -82,6 +82,7 @@ public PreviewController(IHttpContextAccessor httpContextAccessor,
[Route("/preview/{org}/{app:regex(^(?!datamodels$)[[a-z]][[a-z0-9-]]{{1,28}}[[a-z0-9]]$)}/{*AllValues}")]
public IActionResult Index(string org, string app)
{
+ ViewBag.App = "app-preview";
return View();
}
diff --git a/backend/src/Designer/Controllers/RepositorySettingsController.cs b/backend/src/Designer/Controllers/RepositorySettingsController.cs
deleted file mode 100644
index 7144aa7502b..00000000000
--- a/backend/src/Designer/Controllers/RepositorySettingsController.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using System.IO;
-using System.Net;
-using System.Threading.Tasks;
-using Altinn.Studio.Designer.Helpers;
-using Altinn.Studio.Designer.Models;
-using Altinn.Studio.Designer.Services.Interfaces;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-
-namespace Altinn.Studio.Designer.Controllers
-{
- ///
- /// Controller containing actions to handle repository settings aka Altinn Studio settings.
- ///
- [AutoValidateAntiforgeryToken]
- [ApiController]
- [Authorize]
- [Route("/designer/api/{org}/{repository:regex(^(?!datamodels$)[[a-z]][[a-z0-9-]]{{1,28}}[[a-z0-9]]$)}/repository-settings")]
- public class RepositorySettingsController : ControllerBase
- {
- private readonly IAltinnGitRepositoryFactory _altinnGitRepositoryFactory;
-
- ///
- /// Initializes a new instance of the class.
- ///
- /// An instance that knows how to get repositories.
- public RepositorySettingsController(IAltinnGitRepositoryFactory altinnGitRepositoryFactory)
- {
- _altinnGitRepositoryFactory = altinnGitRepositoryFactory;
- }
-
- ///
- /// Gets the settings for the repository. This is the same as can be found in
- /// .AltinnStudio\settings.json
- ///
- [HttpGet]
- public async Task> Get(string org, string repository)
- {
- var developer = AuthenticationHelper.GetDeveloperUserName(HttpContext);
-
- AltinnStudioSettings settings;
- try
- {
- var altinnGitRepository = _altinnGitRepositoryFactory.GetAltinnGitRepository(org, repository, developer);
- settings = await altinnGitRepository.GetAltinnStudioSettings();
- }
- catch (DirectoryNotFoundException)
- {
- return NotFound(new ProblemDetails() { Title = "Not found", Detail = $"Could not find repository {org}/{repository} for user {developer}", Status = (int)HttpStatusCode.NotFound });
- }
-
- return Ok(settings);
- }
-
- ///
- /// Updates the settings on disk with the provided settings.
- /// This will overwrite the current on-disk settings.
- ///
- [HttpPut]
- public async Task Put(string org, string repository, [FromBody] AltinnStudioSettings settings)
- {
- var developer = AuthenticationHelper.GetDeveloperUserName(HttpContext);
-
- if (!ModelState.IsValid)
- {
- return BadRequest(ModelState);
- }
-
- var altinnGitRepository = _altinnGitRepositoryFactory.GetAltinnGitRepository(org, repository, developer);
- await altinnGitRepository.SaveAltinnStudioSettings(settings);
- return Ok(settings);
- }
- }
-}
diff --git a/backend/src/Designer/Controllers/ResourceAdmController.cs b/backend/src/Designer/Controllers/ResourceAdmController.cs
index 2f1861c08a6..7738e2b6f0b 100644
--- a/backend/src/Designer/Controllers/ResourceAdmController.cs
+++ b/backend/src/Designer/Controllers/ResourceAdmController.cs
@@ -21,6 +21,7 @@ public ResourceAdmController(ISourceControl sourceControl)
public async Task Index(string org, string repo)
{
await _sourceControl.VerifyCloneExists(org, repo);
+ ViewBag.App = "resourceadm";
return View();
}
}
diff --git a/backend/src/Designer/Controllers/TextController.cs b/backend/src/Designer/Controllers/TextController.cs
index de58849a34d..d7af54833eb 100644
--- a/backend/src/Designer/Controllers/TextController.cs
+++ b/backend/src/Designer/Controllers/TextController.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Text;
using System.Threading.Tasks;
using Altinn.Studio.Designer.Helpers;
using Altinn.Studio.Designer.Models;
@@ -48,28 +47,6 @@ public TextController(IWebHostEnvironment hostingEnvironment, IRepository reposi
_textsService = textsService;
}
- ///
- /// The View for text resources
- ///
- /// Unique identifier of the organisation responsible for the app.
- /// Application identifier which is unique within an organisation.
- /// The view with JSON editor
- [HttpGet]
- [Route("/designer/{org}/{app:regex(^[[a-z]]+[[a-zA-Z0-9-]]+[[a-zA-Z0-9]]$)}/Text")]
- public IActionResult Index(string org, string app)
- {
- string developer = AuthenticationHelper.GetDeveloperUserName(_httpContextAccessor.HttpContext);
- IList languages = _textsService.GetLanguages(org, app, developer);
-
- if (Request.Headers["accept"] == "application/json")
- {
- Dictionary> resources = _repository.GetServiceTexts(AltinnRepoEditingContext.FromOrgRepoDeveloper(org, app, developer));
- return Json(resources);
- }
-
- return View(languages);
- }
-
///
/// The languages in the app
///
@@ -253,17 +230,5 @@ public IActionResult DeleteLanguage(string org, string app, string languageCode)
return BadRequest($"Resource.{languageCode}.json could not be deleted.");
}
-
- ///
- /// Get the JSON schema for resource files
- ///
- /// JSON content
- [HttpGet]
- [Route("json-schema")]
- public IActionResult GetResourceSchema()
- {
- string schema = System.IO.File.ReadAllText(_hostingEnvironment.WebRootPath + "/designer/json/schema/resource-schema.json");
- return Content(schema, "application/json", Encoding.UTF8);
- }
}
}
diff --git a/backend/src/Designer/Program.cs b/backend/src/Designer/Program.cs
index 8e4b4541058..b82c9f28ad6 100644
--- a/backend/src/Designer/Program.cs
+++ b/backend/src/Designer/Program.cs
@@ -289,7 +289,6 @@ void Configure(IConfiguration configuration)
}
app.UseDefaultFiles();
- app.UseStaticFiles();
app.UseStaticFiles(new StaticFileOptions
{
OnPrepareResponse = context =>
@@ -300,7 +299,7 @@ void Configure(IConfiguration configuration)
Public = true,
MaxAge = TimeSpan.FromMinutes(60),
};
- },
+ }
});
const string swaggerRoutePrefix = "designer/swagger";
diff --git a/backend/src/Designer/Services/Implementation/RepositorySI.cs b/backend/src/Designer/Services/Implementation/RepositorySI.cs
index 114aebad69c..cb8b3f3692b 100644
--- a/backend/src/Designer/Services/Implementation/RepositorySI.cs
+++ b/backend/src/Designer/Services/Implementation/RepositorySI.cs
@@ -133,26 +133,6 @@ public string GetAppPath(string org, string app)
return _settings.GetServicePath(org, app, AuthenticationHelper.GetDeveloperUserName(_httpContextAccessor.HttpContext));
}
- ///
- public Dictionary> GetServiceTexts(AltinnRepoEditingContext altinnRepoEditingContext)
- {
- Dictionary> appTextsAllLanguages = new();
-
- // Get app level text resources
- string resourcePath = _settings.GetLanguageResourcePath(altinnRepoEditingContext.Org, altinnRepoEditingContext.Repo, altinnRepoEditingContext.Developer);
- appTextsAllLanguages = MergeResourceTexts(resourcePath, appTextsAllLanguages);
-
- // Get Org level text resources
- string orgResourcePath = _settings.GetOrgTextResourcePath(altinnRepoEditingContext.Org, altinnRepoEditingContext.Developer);
- appTextsAllLanguages = MergeResourceTexts(orgResourcePath, appTextsAllLanguages);
-
- // Get Altinn common level text resources
- string commonResourcePath = _settings.GetCommonTextResourcePath(altinnRepoEditingContext.Developer);
- appTextsAllLanguages = MergeResourceTexts(commonResourcePath, appTextsAllLanguages);
-
- return appTextsAllLanguages;
- }
-
///
/// Merges the provided resource texts with the resource text in the the given path
///
diff --git a/backend/src/Designer/Services/Interfaces/IRepository.cs b/backend/src/Designer/Services/Interfaces/IRepository.cs
index c7625b5ab10..e08e3d93d91 100644
--- a/backend/src/Designer/Services/Interfaces/IRepository.cs
+++ b/backend/src/Designer/Services/Interfaces/IRepository.cs
@@ -47,16 +47,6 @@ public interface IRepository
/// True if the reset was successful, otherwise false.
Task ResetLocalRepository(AltinnRepoEditingContext altinnRepoEditingContext);
- ///
- /// Returns the app texts
- ///
- /// An .
- ///
- /// Format of the dictionary is: <textResourceElementId <language, textResourceElement>>
- ///
- /// The text resources
- Dictionary> GetServiceTexts(AltinnRepoEditingContext altinnRepoEditingContext);
-
///
/// Saves policy to git repository
///
diff --git a/backend/src/Designer/Views/AppDevelopment/index.cshtml b/backend/src/Designer/Views/AppDevelopment/index.cshtml
deleted file mode 100644
index 8559cb3e684..00000000000
--- a/backend/src/Designer/Views/AppDevelopment/index.cshtml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-@{
- Layout = "_FormBuilderLayout";
- ViewBag.Title = "Altinn Studio";
-}
-
-@section scripts {
-
-
-
-
-
-}
-
-
-
-
-
diff --git a/backend/src/Designer/Views/Home/Dashboard.cshtml b/backend/src/Designer/Views/Home/Dashboard.cshtml
deleted file mode 100644
index e7e181a3ae1..00000000000
--- a/backend/src/Designer/Views/Home/Dashboard.cshtml
+++ /dev/null
@@ -1,17 +0,0 @@
-@{ViewBag.Title = "Altinn Studio";}
-
-
-
- @ViewBag.Title
-
-
-
-
-
-
-
-
-
diff --git a/backend/src/Designer/Views/Home/Docs.cshtml b/backend/src/Designer/Views/Home/Docs.cshtml
deleted file mode 100644
index 185334616c7..00000000000
--- a/backend/src/Designer/Views/Home/Docs.cshtml
+++ /dev/null
@@ -1,5 +0,0 @@
-@{ViewBag.Title = "Dokumentasjon";}
-
-
- https://docs.altinn.studio/
-
diff --git a/backend/src/Designer/Views/Home/Index.cshtml b/backend/src/Designer/Views/Home/Index.cshtml
deleted file mode 100644
index e23bb582e37..00000000000
--- a/backend/src/Designer/Views/Home/Index.cshtml
+++ /dev/null
@@ -1,25 +0,0 @@
-@{
- ViewBag.Title = "Altinn Studio";
-}
-
-
-
-
- @ViewBag.Title
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/backend/src/Designer/Views/Home/NotAuthorized.cshtml b/backend/src/Designer/Views/Home/NotAuthorized.cshtml
deleted file mode 100644
index b2634338ede..00000000000
--- a/backend/src/Designer/Views/Home/NotAuthorized.cshtml
+++ /dev/null
@@ -1,3 +0,0 @@
-@{ViewBag.Title = "Ingen adgang"; }
-
-
- Digitalisering av offentlige tjenester blir best når etatene samarbeider og deler data. Derfor
- har vi laget Altinn studio. Her lager du gode digitale tjenester basert på Altinns sikre
- infrastruktur,
- og du kan bruke tekniske komponenter og koblinger som allerede eksisterer i Altinn.
-
+
+
+
+
+
+
Effektiv digitalisering
+
+ Digitalisering av offentlige tjenester blir best når etatene samarbeider og deler data.
+ Derfor
+ har vi laget Altinn studio. Her lager du gode digitale tjenester basert på Altinns sikre
+ infrastruktur,
+ og du kan bruke tekniske komponenter og koblinger som allerede eksisterer i Altinn.
+
+
-
-
-
-
-
-
-
Brukervennlig verktøy
-
- Det skal være enkelt å lage brukervennlige, universelt utformede tjenester. De aller enkleste skjemaene
- lager du uten teknisk spisskompetanse.
- For mer avanserte oppgaver, gir verktøyet utviklere den fleksibiliteten som trengs for å lage et bredt
- spekter digitale tjenester.
- Samarbeid i Altinn studio helt fra tidlige ideer til spesifikasjon og utvikling.
-
+
+
+
+
+
+
Brukervennlig verktøy
+
+ Det skal være enkelt å lage brukervennlige, universelt utformede tjenester. De aller
+ enkleste skjemaene
+ lager du uten teknisk spisskompetanse.
+ For mer avanserte oppgaver, gir verktøyet utviklere den fleksibiliteten som trengs for å
+ lage et bredt
+ spekter digitale tjenester.
+ Samarbeid i Altinn studio helt fra tidlige ideer til spesifikasjon og utvikling.
+
+
-
-
-
-
-
-
-
Deling og gjenbruk
-
- Få enkel tilgang til registerdata fra blant annet Enhetsregisteret og Folkeregisteret. Lær av andre
- etater ved å utforske deres tjenester.
- Du ser både de ferdige tjenestene, og hvordan de er bygget opp med kode og datakilder.
- Du har full kontroll over egen tjeneste og hvem du ønsker å dele denne med, men vi oppfordrer alle til
- å dele ideer, løsninger og maler.
-
+
+
+
+
+
+
Deling og gjenbruk
+
+ Få enkel tilgang til registerdata fra blant annet Enhetsregisteret og Folkeregisteret.
+ Lær av andre
+ etater ved å utforske deres tjenester.
+ Du ser både de ferdige tjenestene, og hvordan de er bygget opp med kode og datakilder.
+ Du har full kontroll over egen tjeneste og hvem du ønsker å dele denne med, men vi
+ oppfordrer alle til
+ å dele ideer, løsninger og maler.
+
+
-
-
-
+
+
-
Hvorfor skal du bruke Altinn Studio?
-
-
- Et sikkert, fleksibelt og brukervennlig verktøy for å lage tjenester
-
-
- Nye, moderne og brukervennlige digitale tjenester presentert til dine sluttbrukere
-
-
- Altinns sikre tekniske infrastruktur
-
-
- Selvbetjent utvikling og produksjonssetting
-
-
- Mulighet til å gjenbruke kode, data, funksjonalitet, logikk og dynamikk som andre har delt
-
-
- Mulighet til å gjenbruke ferdige GUI-komponenter som er brukertestet og universelt utformet
-
-
- Et verktøy som tilrettelegger for samarbeid innad og på tvers av organisasjoner
-
-
-
Slik tar du i bruk Altinn Studio:
+
Hvorfor skal du bruke Altinn Studio?
+
+
+ Et sikkert, fleksibelt og brukervennlig verktøy for å lage tjenester
+
+
+ Nye, moderne og brukervennlige digitale tjenester presentert til dine sluttbrukere
+
+
+ Altinns sikre tekniske infrastruktur
+
+
+ Selvbetjent utvikling og produksjonssetting
+
+
+ Mulighet til å gjenbruke kode, data, funksjonalitet, logikk og dynamikk som andre har delt
+
+
+ Mulighet til å gjenbruke ferdige GUI-komponenter som er brukertestet og universelt utformet
+
+
+ Et verktøy som tilrettelegger for samarbeid innad og på tvers av organisasjoner
+
Altinn Studio er klart til bruk. Bare sett i gang med å opprette, lage og teste dine tjenester.
-
-
Av erfaring vet vi at det tar lang tid å finne ut av hvordan en ny tjeneste skal være. Derfor
- oppfordrer deg til å allerede nå tenke på hvordan de nye tjenestene skal fungere, selv om de ikke
- skal på lufta med det første.
-
Altinn Studio vil over tid erstatte de tidligere verktøyene InfoPath, TUL og SERES domeneklient.
-
-
Gamle verktøy vil være tilgjengelige for endringer i eksisterende tjenester frem til 2026.
Altinn Studio er klart til bruk. Bare sett i gang med å opprette, lage og
+ teste dine tjenester.
+
+
Av erfaring vet vi at det tar lang tid å finne ut av hvordan en ny tjeneste
+ skal være. Derfor
+ oppfordrer deg til å allerede nå tenke på hvordan de nye tjenestene skal
+ fungere, selv om de ikke
+ skal på lufta med det første.
+
Altinn Studio vil over tid erstatte de tidligere verktøyene InfoPath, TUL og
+ SERES domeneklient.
+
+
Gamle verktøy vil være tilgjengelige for endringer i eksisterende tjenester
+ frem til 2026.