mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 21:37:49 -05:00
disable space creation for demo user on hosted instance
This commit is contained in:
@@ -69,6 +69,9 @@ def space_overview(request):
|
||||
if request.POST:
|
||||
create_form = SpaceCreateForm(request.POST, prefix='create')
|
||||
join_form = SpaceJoinForm(request.POST, prefix='join')
|
||||
if settings.HOSTED and request.user.username == 'demo':
|
||||
messages.add_message(request, messages.WARNING, _('This feature is not available in the demo version!'))
|
||||
else:
|
||||
if create_form.is_valid():
|
||||
created_space = Space.objects.create(
|
||||
name=create_form.cleaned_data['name'],
|
||||
|
||||
Reference in New Issue
Block a user