mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	mypy: Use Python 3 type syntax in zerver/views/invite.py.
This commit is contained in:
		@@ -17,10 +17,10 @@ from zerver.models import PreregistrationUser, Stream, UserProfile
 | 
				
			|||||||
import re
 | 
					import re
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@has_request_variables
 | 
					@has_request_variables
 | 
				
			||||||
def invite_users_backend(request, user_profile,
 | 
					def invite_users_backend(request: HttpRequest, user_profile: UserProfile,
 | 
				
			||||||
                         invitee_emails_raw=REQ("invitee_emails"),
 | 
					                         invitee_emails_raw: str=REQ("invitee_emails"),
 | 
				
			||||||
                         invite_as_admin=REQ(validator=check_bool, default=False)):
 | 
					                         invite_as_admin: Optional[bool]=REQ(validator=check_bool, default=False),
 | 
				
			||||||
    # type: (HttpRequest, UserProfile, str, Optional[bool]) -> HttpResponse
 | 
					                         ) -> HttpResponse:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if user_profile.realm.invite_by_admins_only and not user_profile.is_realm_admin:
 | 
					    if user_profile.realm.invite_by_admins_only and not user_profile.is_realm_admin:
 | 
				
			||||||
        return json_error(_("Must be a realm administrator"))
 | 
					        return json_error(_("Must be a realm administrator"))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user