Same account log in from different places at same time

I noticed that the same account ID can be logged in from different places at the same time.
How can this be banned?
I think that different operators should not use the same account. But now, this is feasible.

Hi @nideyijuyidong, not quite what you are after, but you could log out the other clients if your operator logs in on another terminal by using system.util.sendMessage() and system.perspective.logout() or system.security.logout().

1 Like

But They can use Session Status Panel. Scripts won’t work, right?
I forgot to show that’s Perspective.

Apologies, what do you mean by this?

Are you trying to prevent access to the Gateway, or to certain pages in the Perspective Project?

You can log in at here always, or there are some way to disable it?


The operaters shared their account, and use only one ID. I want they use their own ID, not others ,so I can keep track of who did what.

You can disable the app bar by setting the session property of appBar to hidden

1 Like

Thank you very much !

1 Like

Here is my code. I don’t know how to send message after log in.

Gateway Events - Timer - userId:

> sessionList=system.perspective.getSessionInfo()
> userList=[]
> for item in sessionList:
> 	name=str(item['username'])
> 	if name!='Unauthenticated' and item['sessionScope']!='designer':
> 		if name in userList:
> 			system.util.sendMessage(project='demo',messageHandler='usernamelogout',user=name)
> 		else:
> 			userList.append(name)

Session Events - Message - usernamelogout:
system.perspective.closeSession()

It’s not perfect, but it’s simple and effective.

1 Like

You could use a change script on the auth.user.id session property.

1 Like

YES, good idea.
I use a Session Custom parameter link to user.id.

1 Like