Once logged out user cannot return to meeting without the server validating their entrance.
This commit is contained in:
parent
7e4b88a5d1
commit
730616631a
@ -55,6 +55,7 @@ Meteor.methods
|
||||
setInSession("meetingName", null)
|
||||
setInSession("bbbServerVersion", "0.90")
|
||||
setInSession("userName", null)
|
||||
Meteor.validUser = true
|
||||
|
||||
@getUsersName = ->
|
||||
name = getInSession("userName") # check if we actually have one in the session
|
||||
|
@ -9,6 +9,8 @@ Meteor.startup ->
|
||||
amplify.store(key, value);
|
||||
},
|
||||
});`
|
||||
if getInSession("userId") is "SIGNED_OUT"
|
||||
Router.go("logout")
|
||||
|
||||
SessionAmplify.set "display_usersList", true
|
||||
SessionAmplify.set "display_navbar", true
|
||||
@ -36,7 +38,16 @@ Template.header.events
|
||||
toggleMic @
|
||||
"click .signOutIcon": (event) ->
|
||||
Meteor.call("userLogout", getInSession("meetingId"), getInSession("userId"))
|
||||
Session.set "display_navbar", false # needed to hide navbar when the layout template renders
|
||||
setInSession "display_navbar", false # needed to hide navbar when the layout template renders
|
||||
# wipe session
|
||||
Session.keys = {}
|
||||
Session.keyDeps = {}
|
||||
Session.keyDepsDeps = {}
|
||||
# # wipe persisted session
|
||||
SessionAmplify.keys = {}
|
||||
SessionAmplify.keyDeps = {}
|
||||
SessionAmplify.keyDepsDeps = {}
|
||||
Meteor.validUser = false
|
||||
Router.go('logout');
|
||||
"click .hideNavbarIcon": (event) ->
|
||||
toggleNavbar()
|
||||
|
@ -1,3 +1,4 @@
|
||||
Meteor.validUser = false
|
||||
Router.configure layoutTemplate: 'layout'
|
||||
|
||||
Router.map ->
|
||||
@ -42,6 +43,9 @@ Router.map ->
|
||||
Meteor.subscribe 'shapes', getInSession('meetingId')
|
||||
Meteor.subscribe 'slides', getInSession('meetingId')
|
||||
Meteor.subscribe 'meetings', getInSession('meetingId')
|
||||
if Meteor.validUser is false
|
||||
@redirect("logout")
|
||||
|
||||
@route "logout",
|
||||
path: "logout"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user