cgxp.plugins.Login

ptype
cgxp_login
class cgxp.plugins.Login(config)

Provides an action that opens a login form panel.

Example Use

Sample code showing how to add a Login plugin to a gxp.Viewer:

new gxp.Viewer({
    ...
    tools: [{
        ptype: 'cgxp_login',
        actionTarget: 'center.tbar',
        toggleGroup: 'maptools',
        events: EVENTS,
% if user:
        username: "${user.username}",
        isPasswordChanged: ${"true" if user.is_password_changed else "false"},
% endif
        loginURL: "${request.route_url('login')}",
        loginChangeURL: "${request.route_url('loginchange')}",
        logoutURL: "${request.route_url('logout')}",
        loginResetPasswordURL: "${request.route_url('loginresetpassword')}",
        permalinkId: "permalink",
        enablePasswordChange: true,
        forcePasswordChange: true,
        loginFormTopCell: {
            html: 'some content here',
            xtype: 'panel',
            unstyled: true,
            height: 50
        }
    }]
    ...
});

Config Options

Configuration properties.

actionConfig

Object Config object for the action created by this plugin.

enablePasswordChange

Boolean if set to true, a menu is enabled, allowing the user to change his password.

Default: false

events

Ext.util.Observable An Ext.util.Observable instance used to receive events from other plugins.

  • restrictedcontentnotdisplayed: sent on restricted content enabled from permalink.
forcePasswordChange

Boolean if set to true, display a message reminding the user to change his password (if he hasn’t already). Require isPasswordChanged to be set.

Default: false

ignoreExistingPermalink

Boolean if set to true, existing permalink in url are ignored and the permalink corresponding to the up-to-date state of the application is used.

Default: false

isIntranetAnonymous

Boolean True when an anonymous user is detected as coming from the intranet.

Default: false.

isPasswordChanged

Boolean State if the user password has been changed. Only required if forcePasswordChange is enabled.

Default: false

loginChangeURL

URL of the login change service.

loginFormBottomCell

Ext.Component containing some HTML code to place below the form of the login panel. Default is null. Not displayed in the password change form.

loginFormText

String Text of the submit button in the login form. Defaults to the value of the loginText parameter. Set to ‘’ to display no text.

loginFormTopCell

Ext.Component containing some HTML code to place above the form of the login panel. Default is null. Not displayed in the password change form.

loginResetPasswordURL

URL of the login reset service. Also enable the reset password button.

loginToolbarText

String Text of the login button in the toolbar. Defaults to the value of the loginText parameter. Set to ‘’ to display no text.

loginURL

URL of the login service.

logoutURL

URL of the logout service.

neverUseCurrentContext

Boolean If true, will zoom to the extent set in the admin role setup at login.

Default: false

permalinkId

String Id of the permalink tool. You need to set an id in the permalink plugin config

toggleGroup

The group this toggle button is member of.

toolbarItems

Array List of items shown in the toolbar for the login tool.

Default: empty array.

username

Username of currently logged in user.

Table Of Contents

Previous topic

cgxp.plugins.LocationChooser

Next topic

cgxp.plugins.MapOpacitySlider

This Page

Fork me on GitHub