Skip to content

Commit

Permalink
Undoing earlier changes, they didn't work out as expected
Browse files Browse the repository at this point in the history
  • Loading branch information
grtjn committed May 21, 2015
1 parent 42c8bbe commit f9d1dbe
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deploy/ml-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@
<external-security-name>marklogic-ldap</external-security-name>
<description>Authentication against MarkLogic LDAP</description>
<authentication>ldap</authentication>
<cache-timeout>300</cache-timeout>
<cache-timeout>999999999</cache-timeout>
<authorization>ldap</authorization>
<ldap-server-uri>ldap://ldap.marklogic.com:3268</ldap-server-uri>
<ldap-base>OU=Employees,OU=CORP,DC=marklogic,DC=com</ldap-base>
Expand Down
2 changes: 2 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ exports.buildExpress = function(options) {
}

function clearLdapCache(req) {
/* GJo: not working as expected. Instead we will use unlimited cache timeout..
var mlReq = http.request({
hostname: options.mlHost,
port: options.mlPort,
Expand All @@ -63,6 +64,7 @@ exports.buildExpress = function(options) {
});
mlReq.end();
*/
}

function proxy(req, res) {
Expand Down
26 changes: 19 additions & 7 deletions ui/app/scripts/controllers/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
'use strict';

angular.module('demoCat')
.factory('DemoModel', DemoModel)
.controller('DemoCtrl', DemoCtrl);

DemoCtrl.$inject = ['$scope', 'MLRest', '$location', '$routeParams', 'demo', 'user', '$modal', '$sce', 'demoService', '$sanitize'];

function DemoCtrl($scope, mlRest, $location, $routeParams, demo, user, $modal, $sce, demoService, $sanitize) {
var uri = $routeParams.uri;
function DemoModel() {
var commentModel = {
// set by model binding
msg: '',
Expand All @@ -32,7 +30,6 @@

var model = {
// your model stuff here
uri: $routeParams.uri,
demo: {
comments: [],
bugs: []
Expand Down Expand Up @@ -60,9 +57,18 @@
/* jshint camelcase: false */
toolbar_full: '',
followError: false
},
user: user
}
};
return model;
}

DemoCtrl.$inject = ['$scope', 'MLRest', '$location', '$routeParams', 'demo', 'user', '$modal', '$sce', 'demoService', '$sanitize', 'DemoModel'];

function DemoCtrl($scope, mlRest, $location, $routeParams, demo, user, $modal, $sce, demoService, $sanitize, model) {
var uri = $routeParams.uri;
model.uri = $routeParams.uri;
model.user = user;

if (demo) {
var imageExtensions = ['jpeg','jpg','gif','png'];
var videoExtensions = ['webm','ogg','mp4'];
Expand Down Expand Up @@ -93,6 +99,12 @@
bug.nr = index + 1;
}
});
} else {
model.demo = {
comments: [],
bugs: []
};
model.attachedMedia = [];
}

angular.extend($scope, {
Expand Down

0 comments on commit f9d1dbe

Please sign in to comment.