AppConfiguration.js revision 498b47517d2861e0dfb987e04505120067785a8c
0N/A/**
2362N/A * The contents of this file are subject to the terms of the Common Development and
0N/A * Distribution License (the License). You may not use this file except in compliance with the
0N/A * License.
0N/A *
0N/A * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
2362N/A * specific language governing permission and limitations under the License.
0N/A *
2362N/A * When distributing Covered Software, include this CDDL Header Notice in each file and include
0N/A * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
0N/A * Header, with the fields enclosed by brackets [] replaced by your own identifying
0N/A * information: "Portions copyright [year] [name of copyright owner]".
0N/A *
0N/A * Portions copyright 2011-2015 ForgeRock AS.
0N/A */
0N/A
0N/Adefine("config/AppConfiguration", [
0N/A "org/forgerock/openam/ui/common/util/Constants"
0N/A], function (Constants) {
0N/A var obj = {
2362N/A moduleDefinition: [{
2362N/A moduleClass: "org/forgerock/commons/ui/common/main/SessionManager",
2362N/A configuration: {
0N/A loginHelperClass: "org/forgerock/openam/ui/user/login/RESTLoginHelper"
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/main/Router",
0N/A configuration: {
0N/A routes: {},
0N/A loader: [
0N/A { "routes": "config/routes/AMRoutesConfig" },
0N/A { "routes": "config/routes/CommonRoutesConfig" },
0N/A { "routes": "config/routes/UserRoutesConfig" },
0N/A { "routes": "config/routes/admin/AdminRoutes" },
0N/A { "routes": "config/routes/admin/RealmsRoutes" },
0N/A { "routes": "config/routes/user/UMARoutes" }
0N/A ]
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/SiteConfigurator",
0N/A configuration: {
0N/A selfRegistration: false,
0N/A enterprise: false,
0N/A remoteConfig: true,
0N/A delegate: "org/forgerock/openam/ui/common/delegates/SiteConfigurationDelegate"
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/main/ProcessConfiguration",
0N/A configuration: {
0N/A processConfigurationFiles: [
0N/A "config/process/AMConfig",
0N/A "config/process/CommonConfig"
0N/A ]
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/main/ServiceInvoker",
0N/A configuration: {
0N/A defaultHeaders: {
0N/A }
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/main/ErrorsHandler",
0N/A configuration: {
0N/A defaultHandlers: {
0N/A },
0N/A loader: [
0N/A { "defaultHandlers": "config/errorhandlers/CommonErrorHandlers" }
0N/A ]
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/util/UIUtils",
0N/A configuration: {
0N/A templateUrls: [
0N/A ],
0N/A partialUrls: [
0N/A "partials/form/_JSONSchemaFooter.html",
0N/A "partials/headers/_Title.html",
0N/A "partials/headers/_TitleWithSubAndIcon.html",
0N/A "partials/login/_Choice.html",
0N/A "partials/login/_Confirmation.html",
0N/A "partials/login/_Default.html",
0N/A "partials/login/_HiddenValue.html",
0N/A "partials/login/_Password.html",
0N/A "partials/login/_Redirect.html",
0N/A "partials/login/_RememberLogin.html",
0N/A "partials/login/_ScriptTextOutput.html",
0N/A "partials/login/_SelfService.html",
0N/A "partials/login/_SocialAuthn.html",
0N/A "partials/login/_TextInput.html",
0N/A "partials/login/_TextOutput.html"
0N/A ]
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/components/Messages",
0N/A configuration: {
0N/A messages: {
0N/A },
0N/A loader: [
0N/A { "messages": "config/messages/CommonMessages" },
0N/A { "messages": "config/messages/UserMessages" },
0N/A { "messages": "config/AppMessages" }
0N/A ]
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/main/ValidatorsManager",
0N/A configuration: {
0N/A policyDelegate: "org/forgerock/openam/ui/common/delegates/PolicyDelegate",
0N/A validators: { },
0N/A loader: [
0N/A { "validators": "config/validators/CommonValidators" }
0N/A ]
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/components/Navigation",
0N/A configuration: {
0N/A userBar: [{
0N/A "id": "selfServiceLink",
0N/A "href": "#profile/details",
0N/A "i18nKey": "common.user.selfService",
0N/A "navGroup": "admin",
0N/A "visibleToRoles": ["ui-self-service-user"]
0N/A }, {
0N/A "id": "administratorLink",
0N/A "href": "#realms",
0N/A "i18nKey": "common.user.administration",
0N/A "navGroup": "admin",
0N/A "visibleToRoles": ["ui-realm-admin"]
0N/A }, { // TODO: The next two items are duplicated from the ones above because of a limitation in commons.
0N/A // We should be able to have visibleToRoles without a navGroup, but that is currently not possible.
0N/A "href": "#profile/details",
0N/A "i18nKey": "common.user.selfService",
0N/A "navGroup": "user",
0N/A "visibleToRoles": ["ui-self-service-user"]
0N/A }, {
0N/A "href": "#realms",
0N/A "i18nKey": "common.user.administration",
0N/A "navGroup": "user",
0N/A "visibleToRoles": ["ui-realm-admin"]
0N/A }, {
0N/A "id": "logoutLink",
0N/A "href": "#logout/",
0N/A "i18nKey": "common.form.logout"
0N/A }],
0N/A links: {
0N/A "admin": {
0N/A "urls": {
0N/A "realms": {
0N/A "url": "#realms",
0N/A "name": "config.AppConfiguration.Navigation.links.realms.title",
0N/A "icon": "fa fa-cloud",
0N/A "dropdown" : true,
0N/A "urls": [{
0N/A "url": "#realms",
0N/A "name": "config.AppConfiguration.Navigation.links.realms.showAll",
0N/A "icon": "fa fa-th"
0N/A }, {
0N/A "event": Constants.EVENT_ADD_NEW_REALM_DIALOG,
0N/A "name": "config.AppConfiguration.Navigation.links.realms.newRealm",
0N/A "icon": "fa fa-plus"
0N/A }, {
0N/A divider: true
0N/A }],
0N/A "visibleToRoles": ["ui-realm-admin"]
0N/A },
0N/A "federation": {
0N/A "url": "#federation",
0N/A "name": "config.AppConfiguration.Navigation.links.federation",
0N/A "icon": "fa fa-building-o",
0N/A "visibleToRoles": ["ui-global-admin"]
0N/A },
0N/A "configuration": {
0N/A "url": "#configuration",
0N/A "name": "config.AppConfiguration.Navigation.links.configuration",
0N/A "icon": "fa fa-cog",
0N/A "visibleToRoles": ["ui-global-admin"]
0N/A },
0N/A "sessions": {
0N/A "url": "#sessions",
0N/A "name": "config.AppConfiguration.Navigation.links.sessions",
0N/A "icon": "fa fa-users",
0N/A "visibleToRoles": ["ui-global-admin"]
0N/A }
0N/A }
0N/A },
0N/A "user" : {
0N/A "urls": {
0N/A "dashboard": {
0N/A "url": "#dashboard/",
0N/A "name": "config.AppConfiguration.Navigation.links.dashboard",
0N/A "icon": "fa fa-dashboard",
0N/A "visibleToRoles": ["ui-self-service-user"]
0N/A },
0N/A "uma": {
0N/A "icon": "fa fa-user",
0N/A "name": "config.AppConfiguration.Navigation.links.uma",
0N/A "dropdown" : true,
0N/A "cssClass": "hidden",
0N/A "urls": {
0N/A "listResource": {
0N/A "url": "#uma/resources/",
0N/A "name": "config.AppConfiguration.Navigation.links.umaLinks.resources"
0N/A },
0N/A "listHistory": {
0N/A "url": "#uma/history/",
0N/A "name": "config.AppConfiguration.Navigation.links.umaLinks.history"
0N/A },
0N/A "listRequests": {
0N/A "url": "#uma/requests/",
0N/A "name": "config.AppConfiguration.Navigation.links.umaLinks.requests"
0N/A }
0N/A },
0N/A "visibleToRoles": ["ui-self-service-user"]
0N/A }
0N/A }
0N/A }
0N/A }
0N/A }
0N/A }],
0N/A loggerLevel: "debug"
0N/A };
0N/A return obj;
0N/A});
0N/A