Make tokens and the EMS obey the token's view permissions. Fixes bug #11583
This commit is contained in:
parent
ac3255e0c6
commit
16927cd916
3 changed files with 4 additions and 2 deletions
|
|
@ -1957,7 +1957,8 @@ sub www_getTokensAsJson {
|
|||
my ($db, $form) = $session->quick(qw(db form));
|
||||
my %results = ();
|
||||
$results{records} = []; ##Initialize to an empty array
|
||||
foreach my $token (@{$self->getTokens}) {
|
||||
TOKEN: foreach my $token (@{$self->getTokens}) {
|
||||
next TOKEN unless $token->canView;
|
||||
push(@{$results{records}}, {
|
||||
title => $token->getTitle,
|
||||
description => $token->get('description'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue