7 Replies Latest reply on Nov 29, 2014 9:55 AM by jiveuser629

    Conditional Redirect after LoginAction in Jive hosted site

    garret.starke

      Is it possible to redirect a user to a specific community conditionally based on their membership to a permission group?  I'm currently achieving this locally by overriding the LoginAction.getSuccessURL() with expected results, but this currently does not work in a Jive hosted site.

        • Re: Conditional Redirect after LoginAction in Jive hosted site
          garret.starke

          Example code:

               @Override
               public String getSuccessURL() {
                    String successURL = super.getSuccessURL();
                    log.debug("BEFORE - successURL: '" + successURL + "'");
                    if (StringUtils.isBlank(successURL)) {
                         ServiceResult result = memberServiceManager
                                   .isMyCommunityMember(getUser());
                         log.debug("isMyCommunityMember: " + result.getResult().toString());
                         if (result.getResult()) {
                              successURL = JiveGlobals.getJiveProperty(
                                        "bespoke.LoginAction.successURL",
                                        "/community/my-community/home");
                         }
                    }
                    log.debug("AFTER - successURL: '" + successURL + "'");
                    return successURL;
               }
          
          
            • Re: Conditional Redirect after LoginAction in Jive hosted site
              jrlarson

              Garret, one of the sessions at Jiveworld covered a very similar scenario. I unfortunately did not capture everything from the session in my notes. I am trying to find out when the materials from that session will be available online.

              • Re: Conditional Redirect after LoginAction in Jive hosted site
                jiveuser629

                hi, where exactly did you write this code? I am a newbie in Jive and trying to perform the same..redirect users to a specific community based on their permission, group, etc.

                Below is my question...

                 

                "How do I auto redirect a login user to a custom community page in Jive 6.0 ?

                I was able to do this to some extent using an admin console plugin with a defaultstack interceptor in my struts.xml file but that requires a manual trigger by the admin. However, what I need is an automatic redirection of the user to a custom community page.

                This should be something like when Jive redirects to a custom space with skin.default.landingpage system property setting, but here there is a limitation that it only redirect a single custom space for ALL users. What I need is a different landing page for different user(s). Thanks in advance for any suggestions!!"

              • Re: Conditional Redirect after LoginAction in Jive hosted site

                Not sure which session John Larson was referencing, but you should be able to watch all the sessions from last year, here.

                The specified item was not found.

                 

                Trevor, given that this thread is 2+ years old ... any chance you can clarify you bump request? =)

                  • Re: Conditional Redirect after LoginAction in Jive hosted site
                    jrlarson

                    Two years ago? I do not remember which session that may have been from The specified item was not found..

                    • Re: Conditional Redirect after LoginAction in Jive hosted site
                      trevorf

                      Ryan,

                       

                      Bump request was because we have SSO login to our Jive instance. I am looking for  way to specify in a single link, by URL (and attributes if necessary), "log in and go to [content item]".

                       

                      Context example:

                      GIVEN the system contains Jive content that is 'Community discussion: how to use your virtual-widget to open doors remotely'

                      WHEN someone is using our product

                      AND the user is confused how to open doors remotely

                      AND the user clicks on the '?' button on our product page

                      THEN a new browser tab is opened

                      AND the user is logged in to Jive automatically (via SSO)

                      AND the user is presented with the content in the Community discussion

                       

                      The Jive community concerned is a host for content from a large number of our products and so custom code (specific to our needs) like what Garret Starke was suggesting is not a great option.

                       

                      Thanks for your time Ryan (and all)!