Commit 5a6942c6 authored by Xavier Guimard's avatar Xavier Guimard

Add "rule" for apps in menu (fixes: #1267)

parent b8811088
......@@ -63,10 +63,17 @@
<input id="iAuto" type="radio" value="auto" ng-model="currentNode.data.display" role="radio" aria-label="Auto"/>
<span trspan="auto">
</label>
<label class="radio-inline">
<input id="iExpr" type="radio" value="rule" ng-click="currentNode.data.display=''" ng-checked="currentNode.data.display!=='on'&&currentNode.data.display!=='off'&&currentNode.data.display!=='auto'" aria-label="Rule" role="radio"/>
<label id="rulel" for="bopeExpr" trspan="specialRule"></label>
</label>
</div>
</td>
</tr>
</table>
<div class="panel-body input-group maxw" ng-if="currentNode.data.display!=='on'&&currentNode.data.display!=='off'&&currentNode.data.display!=='auto'">
<textarea id="iValue" class="form-control" rows="2" ng-model="currentNode.data.display" aria-label="Rule expression"/>
</div>
</div>
<script type="text/ng-template" id="logoChoice.html">
<div class="modal-header">
......
......@@ -461,11 +461,18 @@ sub _filterHash {
# Keep node if display is "yes" or "on"
next if ( $appdisplay =~ /^(yes|on)$/ );
my $cond = undef;
if ( $appdisplay !~ /^auto$/i ) {
$cond =
$self->p->HANDLER->buildSub(
$self->p->HANDLER->substitute($appdisplay) );
}
# Check grant function if display is "auto" (this is the default)
delete $apphash->{$key}
unless (
$self->p->HANDLER->grant(
$req, $req->sessionInfo, $appuri, undef, $vhost
$req, $req->sessionInfo, $appuri, $cond, $vhost
)
);
next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment