Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws
[mkws-moved-to-github.git] / src / mkws-core.js
index 07a4b2d..11a4889 100644 (file)
@@ -182,6 +182,10 @@ mkws.limitQuery  = function(tname, field, value) {
     mkws.teams[tname].limitQuery(field, value);
 };
 
+mkws.limitCategory  = function(tname, id) {
+    mkws.teams[tname].limitCategory(id);
+};
+
 mkws.delimitTarget = function(tname, id) {
     mkws.teams[tname].delimitTarget(id);
 };
@@ -299,8 +303,10 @@ mkws.pagerNext = function(tname) {
            log("Service proxy auth successfully done");
            mkws.authenticated = true;
            var authName = $(data).find("displayName").text();
+           // You'd think there would be a better way to do this:
+           var realm = $(data).find("realm:not(realmAttributes realm)").text();
            for (var teamName in mkws.teams) {
-               mkws.teams[teamName].queue("authenticated").publish(authName);
+               mkws.teams[teamName].queue("authenticated").publish(authName, realm);
            }
 
            runAutoSearches();