Forums de discussion
Permissions problem showing protected Site logo
Iván Bautista, modifié il y a 6 années.
Permissions problem showing protected Site logo
New Member Publications: 16 Date d'inscription: 13/01/15 Publications récentes
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.
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.
Olaf Kock, modifié il y a 6 années.
RE: Permissions problem showing protected Site logo
Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
(exact) version?
Iván Bautista, modifié il y a 6 années.
RE: Permissions problem showing protected Site logo
New Member Publications: 16 Date d'inscription: 13/01/15 Publications récentes
Hi Olaf,
Yes sorry:
DXP SP2 Fixpack 32.
Thanks!
Yes sorry:
DXP SP2 Fixpack 32.
Thanks!
Iván Bautista, modifié il y a 6 années.
RE: Permissions problem showing protected Site logo
New Member Publications: 16 Date d'inscription: 13/01/15 Publications récentes
More information:
JSP code to get the logo´s URL:
The generated URL is the following:
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!
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&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!