Change idle-timeout lock to 'noidletimeout' and add default lock to new Accounts
This commit is contained in:
parent
8a2e362b7c
commit
72e3498785
2 changed files with 3 additions and 2 deletions
|
|
@ -565,7 +565,8 @@ class DefaultAccount(with_metaclass(TypeclassBase, AccountDB)):
|
||||||
"""
|
"""
|
||||||
# A basic security setup
|
# A basic security setup
|
||||||
lockstring = "examine:perm(Admin);edit:perm(Admin);" \
|
lockstring = "examine:perm(Admin);edit:perm(Admin);" \
|
||||||
"delete:perm(Admin);boot:perm(Admin);msg:all()"
|
"delete:perm(Admin);boot:perm(Admin);msg:all();" \
|
||||||
|
"noidletimeout:perm(Builder) or perm(noidletimeout)"
|
||||||
self.locks.add(lockstring)
|
self.locks.add(lockstring)
|
||||||
|
|
||||||
# The ooc account cmdset
|
# The ooc account cmdset
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ def _server_maintenance():
|
||||||
for session in (sess for sess in SESSIONS.values()
|
for session in (sess for sess in SESSIONS.values()
|
||||||
if (now - sess.cmd_last) > _IDLE_TIMEOUT):
|
if (now - sess.cmd_last) > _IDLE_TIMEOUT):
|
||||||
if not session.account or not \
|
if not session.account or not \
|
||||||
session.account.access(session.account, "no_idle_disconnect", default=False):
|
session.account.access(session.account, "noidletimeout", default=False):
|
||||||
SESSIONS.disconnect(session, reason=reason)
|
SESSIONS.disconnect(session, reason=reason)
|
||||||
|
|
||||||
# Commenting this out, it is probably not needed
|
# Commenting this out, it is probably not needed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue