This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Developer » top menu tab to external URL
expandshrink

top menu tab to external URL

top menu tab to external URL

Thursday 26 December 2013 10:05:19 am - 10 replies

Hi,

I'm trying to create a link to external URL (www/google.com for example). I found how to insert a new tab on top menu but the link is <host>/<site_access>/www.google.fr . How can I change menu.ini.append.php in order to be redirected?

My idea is to use the pull/request 256 and use user permission to extend my Back office under symfony2.

Thanks

Thursday 26 December 2013 12:25:07 pm

You must add http for your url : http://www.google.fr

Try this

Thursday 26 December 2013 12:41:59 pm

Thanks it works

Thursday 26 December 2013 1:50:59 pm

Don't forget to put the issue resolved

Thanks

Thursday 26 December 2013 2:51:25 pm

I have an other question in relation to this one. My redirection is using a route defined in a routing.yml file of my bundle. I would like to catch 'Role' of my user (ex='administrator') in order to define symfony role and permission.

I did this test in my controller :

        $securityToken = $this->container->get('security.context')->getToken();
        $userAuth = $securityToken->isAuthenticated();

        //return true.       
       
        $repository = $this->getRepository();
        $roleService = $repository->getRoleService();
        $userService = $repository->getUserService();
        $user = $repository->getCurrentUser();
        $role = $roleService->getRoleAssignmentsForUser($user);

But I have this message :

User does not have access to 'read' 'role'

So I don't think I have my user logged in my Back Office.

Thanks

Modified on Thursday 26 December 2013 2:57:14 pm by Bru Bor

Thursday 26 December 2013 3:20:47 pm

Try to add the rule "Role" to your user group, from your Back office role/list

Thursday 26 December 2013 3:43:47 pm

I already have a role (I'm connected as administrator). The problem is when I'm redirected I change of siteacess. So my user isn't logged. I can see it as follow :

        $user = $repository->getCurrentUser()->content;
        //var_dump($user);
        //$user = $userService->loadUser(14);
        //var_dump($user);

The problem come from my configuration :How to configure ezpublish -> to be connected on two siteaccess. (When Im logging to siteacessA I'm connecting to siteacessB). If I can do it I will keep my user when I do my redirection.

I hope I was clear.

Thanks for your help.

Thursday 26 December 2013 3:51:53 pm

This is because session are specific to a siteaccess with the default settings, Try

site.ini :

[Session]

SessionNameHandler=default

SessionNamePerSiteAccess=disabled

this can help you

http://share.ez.no/forums/developer/single-login-through-different-siteaccess-using-sub-domains

http://share.ez.no/forums/developer/session-siteaccess

Thursday 26 December 2013 5:03:45 pm

Thanks that what I was searching for. I can see I have the same eZSESSID in my back office and my target. But I don't catch my user (style connected as anonymous user). I searching and come back when I have a solution

 

Thanks

Thursday 26 December 2013 5:16:21 pm

I achieve to catch my user .

I add 'session_name: eZSESSID' for my admin_siteaccess in ezpublish.yml.

About security do you think it's safe ?

Thanks for your help

Thursday 26 December 2013 5:34:10 pm

Sorry I have not yet begun EZ5, but soon happy.gif Emoticon

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from