• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[HELPED] Multiples questions of the administration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [HELPED] Multiples questions of the administration

    Hi, I have multiples "questions" with Valence.

    1st: we have IBM I to users, ok, when the users log the first time on Valence they have access to all aplications. how can I change this option to they haven't access any or an specific group/app??

    2nd: how can I delete "forgot password" option of the login panel?
    this:


    3th: can I only show "log out" ?? of this panel:


    thanks for all, Ivan.
    Last edited by ElectNewt; 05-12-2014, 08:04 AM.

  • #2
    Hi Ivan,

    1. You can change the default user template in Portal Admin - Settings. By default the portal will create the user based off vvadmin. You can create a new user in Valence and change the portal to point to that as the default.

    Screen Shot 2014-05-12 at 8.42.09 AM.jpg

    2 & 3 - You can hide the forgot password link and the portal menu items from the Hook.js. "/resources/desktop/Hook.js" You will want to update the componentrender method and grap the login and portal menu.

    Below is an example Hook.js hiding the forgot password and all items on the portal menu but the logout button. Look at the "componentrender" method because those are the only changes you need to do in the Hook.js
    Code:
    Ext.define('Portal.Hook', {
        singleton   : true,
        loginUI     : {
            backgroundColor : '#e9eaed',
            form            : {
                border          : false,
                width           : 425,
                title           : null,
                titleAlign      : 'center',
                bodyStyle       : {
                    "background-color" : "#f6f7f8"
                }
            },
            logo            : {
                padding         : 20,
                url             : '/resources/images/valence_logo.png',
                height          : 70,
                width           : 200,
                style           : {
                    "text-align" : "center"
                }
            }
        },
        lockUI     : {
            form            : {
                border          : false,
                height          : 190,
                width           : 420,
                title           : null,
                titleAlign      : 'center',
                bodyStyle       : {
                    "background-color" : "#f6f7f8"
                }
            },
            logo            : {
                padding         : 15,
                url             : '/resources/images/valence_logo.png',
                height          : 55,
                width           : 200,
                style           : {
                    "text-align" : "center"
                }
            }
        },
        mainUI : {
            logo : {
                paddingLeft     : 15,
                paddingRight    : 15,
                paddingBottom   : 0,
                paddingTop      : 5,
                url             : '/resources/images/valence_logo.png',
                height          : 30,
                width           : 120
            }
        },
        miscellaneousUI : {
            promptBeforeCloseIconColor : '#0D92F4'
        },
        constructor : function () {
            var me = this;
            Portal.getApplication().on({
                scope                : this,
                activateapp          : function(app){
                },
                afterautostart       : function(appTabs){
                },
                appsloaded           : function(){
                    // fired after the "Apps" store has been loaded...
                },
                beforeautostart      : function(){
                    // return false to prevent autostart apps from launching...
                },
                beforecloseapp       : function (app) {
                    // return false to prevent closing the app...
                },
                beforeenvironmentset : function (user, env) {
                    // return false to prevent setting of environment...
                },
                beforelogin          : function (params) {
                    // return false to prevent login attempt...
                },
                beforelogout         : function (user) {
                    // return false to prevent logout...
                },
                beforepoll           : function (params) {
                },
                closeapp             : function (app) {
                },
                componentrender      : function (cmp) {
                    var me = this;
    
                    //grab the login so we can hide the forgot password link
                    //
                    if (cmp.xtype === 'login'){
                        var toolbar = cmp.down('toolbar'),
                            linkContainer;
    
                        //make sure the toolbar is found
                        //
                        if (!Ext.isEmpty(toolbar)){
                            linkContainer = toolbar.items.getAt(0);
    
                            if (!Ext.isEmpty(linkContainer)){
                                //listen for the after render of the link container
                                //
                                linkContainer.on({
                                    afterrender : function(cmp){
                                        var forgotPassword = cmp.el.down('.login-forgot');
                                        if (!Ext.isEmpty(forgotPassword)){
                                            forgotPassword.hide();
                                        }
                                    }
                                });
                            }
                        }
                    }
    
                    //grab the portal menu so we can hide all the items but the logout
                    //
                    if (cmp.xtype === 'portalmenu'){
                        //make sure the menu is found
                        //
                        if (!Ext.isEmpty(cmp.menu)){
                            cmp.menu.items.each(function(item){
                                if (item.text !== vlit.logout){
                                    item.hide();
                                }
                            });
                        }
                    }
                },
                environmentset       : function (user, env) {
                },
                launchapp            : function (app) {
                },
                login                : function (user, sid) {
                },
                loginfailure         : function (user) {
                },
                logout               : function (user) {
                },
                navtoolbarready      : function (toolbar) {
                },
                poll                 : function (rsp) {
                },
                settingsapplied      : function () {
                    var me = this;
                    Ext.apply(Portal.config.Settings, {
                    });
                    // if you have changed any of the above "UI" settings, uncomment the applicable line of code below:
                    //
                    //   Portal.config.UI.setLogin(me.loginUI);
                    //   Portal.config.UI.setLock(me.lockUI);
                    //   Portal.config.UI.setMain(me.mainUI);
                    //   Portal.config.UI.setMiscellaneous(me.miscellaneousUI);
                }
            });
        }
    });

    Comment


    • #3
      It works!!
      thank you very much johnny!

      Comment

      Working...
      X