Browse Source

locked rooms only visible to admins

Akira 9 years ago
parent
commit
65173ef06d
1 changed files with 12 additions and 0 deletions
  1. 12 0
      app/client/client.js

+ 12 - 0
app/client/client.js

@@ -351,6 +351,18 @@ Template.dashboard.onCreated(function() {
     Session.set("type", undefined);
 });
 
+Template.dashboard.onRendered(function(){
+    Rooms.find().fetch().forEach(function(room){
+        if(room.private === true){
+            $(".station h3").each(function(i, el){
+                if($(el).text() === room.display){
+                    $(el).parent().css("display", "none");
+                }
+            })
+        }
+    })
+})
+
 function executeCommand(command, params){
     if (command === "help" || command === "commands") {
         $('#helpModal').modal('show');