- Implemented permission system management inside the game
- changed @chperm to @setperm to avoid confusion with channel commands - added @setgroup command for adding user group permissions - Moved permissions/group setup into settings file to allow admins to tweak without going into evennia engine. - Add all new players to default permission group (defined in settings) - Defined a basic group hierarchy, removed permission 'genperms.builder' in favour of a group named builders instead, containing all relevant permissions. - Filtered out all django's automatic permissions in @setperm/list to make permission system more controlled by admin. - Probably fixed bug that caused new users to not be signed up to channels (more testing needed) - Added Exception handler in unloggedin method create, this was killing tracebacks upon user creation. /Griatch
This commit is contained in:
parent
77f2186d9a
commit
7f7306a6e4
23 changed files with 341 additions and 214 deletions
|
|
@ -1,12 +1,13 @@
|
|||
"""
|
||||
Commands that are available from the connect screen.
|
||||
"""
|
||||
import traceback
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from src.objects.models import Attribute, Object
|
||||
from src import defines_global
|
||||
from src.util import functions_general
|
||||
from src.cmdtable import GLOBAL_UNCON_CMD_TABLE
|
||||
from src.logger import log_errmsg
|
||||
|
||||
def cmd_connect(command):
|
||||
"""
|
||||
|
|
@ -104,7 +105,14 @@ def cmd_create(command):
|
|||
elif len(password) < 3:
|
||||
session.msg("Your password must be at least 3 characters or longer.\n\rFor best security, make it at least 8 characters long, avoid making it a real word and mix numbers into it.")
|
||||
else:
|
||||
Object.objects.create_user(command, uname, email, password)
|
||||
try:
|
||||
Object.objects.create_user(command, uname, email, password)
|
||||
except:
|
||||
# we have to handle traceback ourself at this point, if we don't errors will givo no feedback.
|
||||
session.msg("This is a bug. Please e-mail an admin if the problem persists.\n%s" % traceback.format_exc())
|
||||
log_errmsg(traceback.format_exc())
|
||||
raise
|
||||
|
||||
GLOBAL_UNCON_CMD_TABLE.add_command("create", cmd_create)
|
||||
|
||||
def cmd_quit(command):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue