Skip to content

Commit

Permalink
Merge branch 'develop' into October2022
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Stohn authored and Axel Stohn committed Oct 24, 2022
2 parents 8f9f976 + 8a9bb87 commit fedcefc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 9 additions & 2 deletions Controller/GrouperGroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,16 @@ public function groupSubscribers()

$this->Flash->set(_txt('pl.grouperlite.message.flash.group-detail-members-failed'), array('key' => 'error'));
}
if(count($subscribers) < 1){
$this->response->type('json');
$this->response->statusCode(403);
//$this->response->body(json_encode(array('status' => 'ERROR', 'message' => 'NO ACCESS')));
$this->response->send();
$subscribers = '';
}
$this->set(compact('subscribers'));
$this->set('_serialize', 'subscribers');

$this->set(compact('subscribers'));
$this->set('_serialize', 'subscribers');
}

/**
Expand Down
8 changes: 6 additions & 2 deletions View/Elements/Components/subscriberList.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<p class="sr-only">Loading...</p>
</div>
<div class="modal-body msg">
<p>There was an error retrieving the subscribers.</p>
<p>You do not have access to view memberships.</p>
</div>
<div class="modal-body subs">

Expand Down Expand Up @@ -165,6 +165,7 @@

function loadModalData(id, name) {
$('#model-title-group-name').text(name);
modal.removeClass('error');
return function() {
modal.addClass('loading');
clean();
Expand All @@ -175,7 +176,10 @@
success: function(data) {
createModalContent(data);
},
error: function() {
error: function(xhr) {
if (xhr.status === 403) {
$('#model-title-group-name').text(name + ' (no access)');
}
modal.addClass('error');
},
complete: function() {
Expand Down

0 comments on commit fedcefc

Please sign in to comment.