'POST adds users to a group'

@admin_only
def post(self, name):

    group = self.find_group(name)
    data = self.get_json_body()
    self._check_group_model(data)
    if ('users' not in data):
        raise web.HTTPError(400, 'Must    specify    users    to    add')
    self.log.info('Adding    %i    users    to    group    %s', len(data['users']), name)
    self.log.debug('Adding:    %s', data['users'])
    for user in self._usernames_to_users(data['users']):
        if (user not in group.users):
            group.users.append(user)
        else:
            self.log.warning('User    %s    already    in    group    %s', user.name, name)
    self.db.commit()
    self.write(json.dumps(self.group_model(group)))
