AppConfiguration.js revision 030b6f27a04e25f2e96533819897d0f5d0072bdc
2N/A/**
2N/A * The contents of this file are subject to the terms of the Common Development and
2N/A * Distribution License (the License). You may not use this file except in compliance with the
2N/A * License.
2N/A *
2N/A * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
2N/A * specific language governing permission and limitations under the License.
2N/A *
2N/A * When distributing Covered Software, include this CDDL Header Notice in each file and include
2N/A * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
2N/A * Header, with the fields enclosed by brackets [] replaced by your own identifying
2N/A * information: "Portions copyright [year] [name of copyright owner]".
2N/A *
2N/A * Portions copyright 2011-2015 ForgeRock AS.
2N/A */
2N/A
2N/Adefine("config/AppConfiguration", [
2N/A "org/forgerock/openam/ui/common/util/Constants"
2N/A], function (Constants) {
2N/A var obj = {
2N/A moduleDefinition: [{
2N/A moduleClass: "org/forgerock/commons/ui/common/main/SessionManager",
2N/A configuration: {
2N/A loginHelperClass: "org/forgerock/openam/ui/user/login/RESTLoginHelper"
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/main/Router",
2N/A configuration: {
2N/A routes: {},
2N/A loader: [
2N/A { "routes": "config/routes/AMRoutesConfig" },
2N/A { "routes": "config/routes/CommonRoutesConfig" },
2N/A { "routes": "config/routes/UserRoutesConfig" },
2N/A { "routes": "config/routes/admin/RealmsRoutes" },
2N/A { "routes": "config/routes/admin/GlobalRoutes" },
2N/A { "routes": "config/routes/user/UMARoutes" }
2N/A ]
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/SiteConfigurator",
2N/A configuration: {
2N/A selfRegistration: false,
2N/A enterprise: false,
2N/A remoteConfig: true,
2N/A delegate: "org/forgerock/openam/ui/common/services/SiteConfigurationService"
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/main/ProcessConfiguration",
2N/A configuration: {
2N/A processConfigurationFiles: [
2N/A "config/process/AMConfig",
2N/A "config/process/CommonConfig"
2N/A ]
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/main/ServiceInvoker",
2N/A configuration: {
2N/A defaultHeaders: {
2N/A }
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/main/ErrorsHandler",
2N/A configuration: {
2N/A defaultHandlers: {
2N/A },
2N/A loader: [
2N/A { "defaultHandlers": "config/errorhandlers/CommonErrorHandlers" }
2N/A ]
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/util/UIUtils",
2N/A configuration: {
2N/A templateUrls: [
2N/A ],
2N/A partialUrls: [
2N/A "partials/form/_JSONSchemaFooter.html",
2N/A "partials/form/_AutoCompleteOffFix.html",
2N/A "partials/headers/_Title.html",
2N/A "partials/headers/_TitleWithSubAndIcon.html",
2N/A "partials/login/_Choice.html",
2N/A "partials/login/_Confirmation.html",
2N/A "partials/login/_Default.html",
2N/A "partials/login/_HiddenValue.html",
2N/A "partials/login/_Password.html",
2N/A "partials/login/_Redirect.html",
2N/A "partials/login/_RememberLogin.html",
2N/A "partials/login/_ScriptTextOutput.html",
2N/A "partials/login/_SelfService.html",
2N/A "partials/login/_SocialAuthn.html",
2N/A "partials/login/_TextInput.html",
2N/A "partials/login/_TextOutput.html"
2N/A ]
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/components/Messages",
2N/A configuration: {
2N/A messages: {
2N/A },
2N/A loader: [
2N/A { "messages": "config/messages/CommonMessages" },
2N/A { "messages": "config/messages/UserMessages" },
2N/A { "messages": "config/AppMessages" }
2N/A ]
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/main/ValidatorsManager",
2N/A configuration: {
2N/A validators: { },
2N/A loader: [
2N/A { "validators": "config/validators/CommonValidators" },
2N/A { "validators": "config/validators/AMValidators" }
2N/A ]
2N/A }
2N/A }, {
2N/A moduleClass: "org/forgerock/commons/ui/common/components/Navigation",
2N/A configuration: {
2N/A username: {
2N/A "label" : "config.AppConfiguration.Navigation.username.label"
2N/A },
2N/A userBar: [{
2N/A "href": "#profile/details",
2N/A "i18nKey": "common.user.selfService",
2N/A "navGroup": "admin",
2N/A "visibleToRoles": ["ui-self-service-user"]
2N/A }, {
2N/A "href": "#profile/details",
2N/A "i18nKey": "common.user.profile",
2N/A "navGroup": "user",
2N/A "visibleToRoles": ["ui-self-service-user"]
2N/A }, {
2N/A "href": "#realms",
2N/A "i18nKey": "common.user.administration",
2N/A "navGroup": "user",
2N/A "visibleToRoles": ["ui-realm-admin"]
2N/A }, {
2N/A "href": "#logout/",
2N/A "i18nKey": "common.form.logout"
2N/A }],
2N/A links: {
2N/A "admin": {
2N/A "urls": {
2N/A "realms": {
2N/A "url": "#realms",
2N/A "name": "config.AppConfiguration.Navigation.links.realms.title",
2N/A "icon": "fa fa-cloud hidden-md",
2N/A "dropdown" : true,
2N/A "urls": [{
2N/A "url": "#realms",
2N/A "name": "config.AppConfiguration.Navigation.links.realms.showAll",
2N/A "icon": "fa fa-th"
2N/A }, {
2N/A "event": Constants.EVENT_ADD_NEW_REALM_DIALOG,
2N/A "name": "config.AppConfiguration.Navigation.links.realms.newRealm",
2N/A "icon": "fa fa-plus"
2N/A }, {
2N/A divider: true
2N/A }],
2N/A "visibleToRoles": ["ui-realm-admin"]
2N/A },
2N/A "configure": {
2N/A "url": "#configure",
2N/A "name": "config.AppConfiguration.Navigation.links.configure.title",
2N/A "icon": "fa fa-wrench hidden-md",
2N/A "dropdown" : true,
2N/A "urls": [{
2N/A "url": "#configure/authentication",
2N/A "name": "config.AppConfiguration.Navigation.links.configure.authentication",
2N/A "icon": "fa fa-user"
2N/A }, {
2N/A "url": "#configure/global-services",
2N/A "name": "config.AppConfiguration.Navigation.links.configure.global-services",
2N/A "icon": "fa fa-globe"
2N/A }, {
2N/A "event": Constants.EVENT_REDIRECT_TO_JATO_SERVER_SITE,
2N/A "name": "config.AppConfiguration.Navigation.links.configure.server-defaults",
2N/A "icon": "fa fa-server"
2N/A }],
2N/A "visibleToRoles": ["ui-realm-admin"]
2N/A },
2N/A "deployment": {
2N/A "url": "#deployment",
2N/A "name": "config.AppConfiguration.Navigation.links.deployment.title",
2N/A "icon": "fa fa-sitemap hidden-md",
2N/A "dropdown" : true,
2N/A "urls": [{
2N/A "event": Constants.EVENT_REDIRECT_TO_JATO_SERVER_SITE,
2N/A //"url": "#deployment/servers", TODO: Implement servers and remove link to JATO
2N/A "name": "config.AppConfiguration.Navigation.links.deployment.servers",
2N/A "icon": "fa fa-server"
2N/A }, {
"url": "#deployment/sites",
"name": "config.AppConfiguration.Navigation.links.deployment.sites",
"icon": "fa fa-list-alt"
}],
"visibleToRoles": ["ui-realm-admin"]
},
"federation": {
"event": Constants.EVENT_REDIRECT_TO_JATO_FEDERATION,
"name": "config.AppConfiguration.Navigation.links.federation",
"icon": "fa fa-building-o hidden-md",
"visibleToRoles": ["ui-global-admin"]
},
"sessions": {
"event": Constants.EVENT_REDIRECT_TO_JATO_SESSIONS,
"name": "config.AppConfiguration.Navigation.links.sessions",
"icon": "fa fa-users hidden-md",
"visibleToRoles": ["ui-global-admin"]
}
}
},
"user" : {
"urls": {
"dashboard": {
"url": "#dashboard/",
"name": "config.AppConfiguration.Navigation.links.dashboard",
"icon": "fa fa-dashboard",
"visibleToRoles": ["ui-self-service-user"]
},
"uma": {
"icon": "fa fa-user",
"name": "config.AppConfiguration.Navigation.links.uma",
"dropdown" : true,
"urls": {
"listResource": {
"url": "#uma/resources/",
"name": "config.AppConfiguration.Navigation.links.umaLinks.resources"
},
"listHistory": {
"url": "#uma/history/",
"name": "config.AppConfiguration.Navigation.links.umaLinks.history"
},
"listRequests": {
"url": "#uma/requests/",
"name": "config.AppConfiguration.Navigation.links.umaLinks.requests"
}
},
"visibleToRoles": ["ui-uma-user"]
}
}
}
}
}
}],
loggerLevel: "debug"
};
return obj;
});