1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
Description: fix viewer endpoint
Regression introduced in 2.16.1
Author: Maxime Besson <maxime.besson@worteks.com>
Origin: upstream, commit:c330347f
Bug: https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/issues/2909
Forwarded: not-needed
Applied-Upstream: 2.16.2, commit:c330347f
Reviewed-By: Yadd <yadd@debian.org>
Last-Update: 2023-05-09
--- a/doc/sources/admin/viewer.rst
+++ b/doc/sources/admin/viewer.rst
@@ -39,11 +39,11 @@
In Manager: \* Declare a Virtual Host : manager.example.com \* Set an
access rule for each enabled module :
- #. Configuration : ^/(.*?\.(fcgi|psgi)/)?(manager\.html|confs|$) = $uid
+ #. Configuration : ^/(.*?\.(fcgi|psgi)/)?(manager\.html|confs) = $uid
eq 'dwho'
#. Notifications : ^/(.*?\.(fcgi|psgi)/)?notifications = $uid eq 'dwho'
#. Sessions : ^/(.*?\.(fcgi|psgi)/)?sessions = $uid eq 'dwho'
- #. Viewer : ^/(.*?\.(fcgi|psgi)/)?viewer = $uid =~ /\b(?:dwho|rtyler)\b/
+ #. Viewer : ^/(.*?\.(fcgi|psgi)/)?view = $uid =~ /\b(?:dwho|rtyler)\b/
#. Default : $uid =~ /\b(?:dwho|rtyler)\b/
--- a/lemonldap-ng-manager/site/coffee/viewer.coffee
+++ b/lemonldap-ng-manager/site/coffee/viewer.coffee
@@ -260,7 +260,7 @@
$scope.waiting = true
console.log "Trying to get key #{node.cnodes}"
uri = encodeURI node.cnodes
- $http.get("#{window.confPrefix}#{$scope.currentCfg.cfgNum}/#{uri}").then (response) ->
+ $http.get("#{window.viewPrefix}#{$scope.currentCfg.cfgNum}/#{uri}").then (response) ->
data = response.data
# Manage datas errors
if not data
@@ -368,7 +368,7 @@
uri = encodeURI node.get
else
console.log "Trying to get title #{node.title}"
- $http.get("#{window.confPrefix}#{$scope.currentCfg.cfgNum}/#{if node.get then uri else node.title}").then (response) ->
+ $http.get("#{window.viewPrefix}#{$scope.currentCfg.cfgNum}/#{if node.get then uri else node.title}").then (response) ->
# Set default value if response is null or if asked by server
data = response.data
if (data.value == null or (data.error and data.error.match /setDefault$/ ) ) and node['default'] != null
|