Skip to content

Commit

Permalink
list expose
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix committed Oct 6, 2023
1 parent b74d76d commit c3cdc98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function listPublicationAction(PhraseaApplication $app, Request $request)
if (!$session->has($passSessionName) && $providerId != null) {
try {
$provider = $this->getAuthenticationProviders()->get($providerId);
if ($provider->getType() == 'PsAuth') {
if ($provider->getType() == 'PsAuth' && $exposeConfiguration['auth_provider_name'] == $providerId) {

$session->set($passSessionName, ['access_token' => $provider->getAccessToken()]);
$session->set($this->getLoginSessionName($exposeName), $provider->getUserName());
Expand Down
7 changes: 1 addition & 6 deletions templates/web/prod/WorkZone/Macros.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -670,16 +670,11 @@
<div class="expose-header">
<div id="expose_sel" class="custom_select_dark" style="padding:10px;">
{% set expose_list = app['conf'].get(['phraseanet-service', 'expose-service', 'exposes']) %}
{% set providerId = app['session'].get('auth_provider.id') %}

<select id="expose_list" name="expose_list" class="expose_list">
<option value="">{{ 'prod:expose:select expose' | trans }}</option>
{% for key in expose_list|keys %}
{% if (
(providerId is not null and expose_list[key].auth_provider_name == providerId)
or providerId is empty)
and expose_list[key].activate_expose %}

{% if expose_list[key].activate_expose %}
<option value="{{ key }}">{{ key }}</option>
{% endif %}
{% endfor %}
Expand Down

0 comments on commit c3cdc98

Please sign in to comment.