AppConfiguration.js revision 447012e78436ada1ea9c3e1abcc98fea25df4936
0N/A/**
0N/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
2362N/A * License.
0N/A *
0N/A * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
0N/A * specific language governing permission and limitations under the License.
0N/A *
0N/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-2016 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/RealmsRoutes" },
0N/A { "routes": "config/routes/admin/GlobalRoutes" },
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/services/SiteConfigurationService"
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/form/_AutoCompleteOffFix.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 validators: { },
0N/A loader: [
0N/A { "validators": "config/validators/CommonValidators" },
0N/A { "validators": "config/validators/AMValidators" }
0N/A ]
0N/A }
0N/A }, {
0N/A moduleClass: "org/forgerock/commons/ui/common/components/Navigation",
0N/A configuration: {
0N/A username: {
0N/A "label" : "config.AppConfiguration.Navigation.username.label"
0N/A },
0N/A userBar: [{
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 "href": "#profile/details",
0N/A "i18nKey": "common.user.profile",
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 "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 hidden-md",
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 }, {
"url": "#realms/new",
"name": "config.AppConfiguration.Navigation.links.realms.newRealm",
"icon": "fa fa-plus"
}, {
divider: true
}],
"visibleToRoles": ["ui-realm-admin"]
},
"configure": {
"url": "#configure",
"name": "config.AppConfiguration.Navigation.links.configure.title",
"icon": "fa fa-wrench hidden-md",
"dropdown" : true,
"urls": [{
"url": "#configure/authentication",
"name": "config.AppConfiguration.Navigation.links.configure.authentication",
"icon": "fa fa-user"
}, {
"event": Constants.EVENT_REDIRECT_TO_JATO_CONFIGURATION,
//"url": "#configure/global-services",
"name": "config.AppConfiguration.Navigation.links.configure.global-services",
"icon": "fa fa-globe"
}, {
"event": Constants.EVENT_REDIRECT_TO_JATO_SERVER_SITE,
"name": "config.AppConfiguration.Navigation.links.configure.server-defaults",
"icon": "fa fa-server"
}],
"visibleToRoles": ["ui-realm-admin"]
},
"deployment": {
"url": "#deployment",
"name": "config.AppConfiguration.Navigation.links.deployment.title",
"icon": "fa fa-sitemap hidden-md",
"dropdown" : true,
"urls": [{
"event": Constants.EVENT_REDIRECT_TO_JATO_SERVER_SITE,
//"url": "#deployment/servers", TODO: Implement servers and remove link to JATO
"name": "config.AppConfiguration.Navigation.links.deployment.servers",
"icon": "fa fa-server"
}, {
"url": "#deployment/sites",
"name": "config.AppConfiguration.Navigation.links.deployment.sites",
"icon": "fa fa-bookmark-o"
}],
"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;
});