mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	This adds support for only allowing normal users with account age equal or greater than a "waiting period" threshold to create streams; this is useful for open organizations that want new members to understand the community before creating streams. If create_stream_by_admins_only setting is set to True, only admin users were able to create streams. Now normal users with account age greater or equal than waiting period threshold can also create streams. Account age is defined as number of days passed since the user had created his account. Fixes: #2308. Tweaked by tabbott to clean up the actual can_create_streams logic and the tests.
		
			
				
	
	
		
			20 lines
		
	
	
		
			413 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			413 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# -*- coding: utf-8 -*-
 | 
						|
from __future__ import unicode_literals
 | 
						|
 | 
						|
from django.db import migrations, models
 | 
						|
 | 
						|
 | 
						|
class Migration(migrations.Migration):
 | 
						|
 | 
						|
    dependencies = [
 | 
						|
        ('zerver', '0044_reaction'),
 | 
						|
    ]
 | 
						|
 | 
						|
    operations = [
 | 
						|
        migrations.AddField(
 | 
						|
            model_name='realm',
 | 
						|
            name='waiting_period_threshold',
 | 
						|
            field=models.PositiveIntegerField(default=0),
 | 
						|
        ),
 | 
						|
    ]
 |