I would like to be able to please disable a user.
1 Like
In addition to the addition of roles “Enabled”,then add roles in every windows.
Is there a more convenient way?
If you've added an Enabled role to mock this functionality, I would be using this to auto logout the user after they log in
Add a Role "Disabled".
Then in Vision Starup add script.
I think it's right!
########### 判断是否是禁用用户 ###########
userName = system.security.getUsername()
user = system.user.getUser("", userName)
if("Disabled" in user.getRoles()):
# print(u"是禁用用户")
system.security.logout()
system.gui.messageBox(u"对不起,您是禁用用户,不能登录该系统!",u"提示")
2 Likes