Foren

Permissions problem showing protected Site logo

thumbnail
Iván Bautista, geändert vor 6 Jahren.

Permissions problem showing protected Site logo

New Member Beiträge: 16 Beitrittsdatum: 13.01.15 Neueste Beiträge
Dear all,
We have developed a custom portlets that shows all the Site where the logged user is not member. This list has the Site name and the Site logo. When the Site has public pages everything goes well, but the problem is with the Sites having private pages, an unauthorized error is shown in JS console (firebug, for example) and no logo is displayed (for none admin users ).

To get the logo we are using getLogoURL method.

Do we have any other options or there is some parameters we can add to the URL generated by getLogoURL to jump ovr the permissions and show the private Sites logo to every user?

Thanks so much in advance.

Regards.
thumbnail
Olaf Kock, geändert vor 6 Jahren.

RE: Permissions problem showing protected Site logo

Liferay Legend Beiträge: 6403 Beitrittsdatum: 23.09.08 Neueste Beiträge
(exact) version?
thumbnail
Iván Bautista, geändert vor 6 Jahren.

RE: Permissions problem showing protected Site logo

New Member Beiträge: 16 Beitrittsdatum: 13.01.15 Neueste Beiträge
Hi Olaf,

Yes sorry:

DXP SP2 Fixpack 32.

Thanks!
thumbnail
Iván Bautista, geändert vor 6 Jahren.

RE: Permissions problem showing protected Site logo

New Member Beiträge: 16 Beitrittsdatum: 13.01.15 Neueste Beiträge
More information:

JSP code to get the logo´s URL:
<img alt="Logo del Site" src="<%=site.getLogoURL(themeDisplay, true) %>">


The generated URL is the following:
<img alt="Logo del Site" src="/image/layout_set_logo?img_id=691748&amp;t=1508150719780">


The problem occurs when the Site has private pages and the logged in user is not member of this Site, because the following error shown in console:
layout_set_logo Failed to load resource: the server responded with a status of 401 (Unauthorized)

So we need to find a way to get a logo of a private pages set even if the user is not member ;)

Thanks!