예제 #1
0
def manage_org_users(org_id):
    return render_template(
        'views/organisations/organisation/users/index.html',
        users=current_organisation.team_members,
        show_search_box=(len(current_organisation.team_members) > 7),
        form=SearchUsersForm(),
    )
예제 #2
0
def manage_users(service_id):
    return render_template(
        'views/manage-users.html',
        users=current_service.team_members,
        current_user=current_user,
        show_search_box=(len(current_service.team_members) > 7),
        form=SearchUsersForm(),
        permissions=permissions,
    )
예제 #3
0
def manage_users(service_id):
    return render_template(
        'views/manage-users.html',
        users=current_service.team_members,
        current_user=current_user,
        show_search_box=(len(current_service.team_members) > 7),
        form=SearchUsersForm(),
        permissions=(broadcast_permissions
                     if current_service.has_permission('broadcast') else
                     permissions),
    )
def manage_org_users(org_id):
    users = sorted(
        user_api_client.get_users_for_organisation(org_id=org_id) + [
            invite for invite in org_invite_api_client.get_invites_for_organisation(org_id=org_id)
            if invite.status != 'accepted'
        ],
        key=lambda user: user.email_address,
    )

    return render_template(
        'views/organisations/organisation/users/index.html',
        users=users,
        show_search_box=(len(users) > 7),
        form=SearchUsersForm(),
    )
예제 #5
0
def manage_users(service_id):
    users = sorted(
        user_api_client.get_users_for_service(service_id=service_id) + [
            invite for invite in invite_api_client.get_invites_for_service(
                service_id=service_id) if invite.status != 'accepted'
        ],
        key=lambda user: user.email_address,
    )

    return render_template(
        'views/manage-users.html',
        users=users,
        current_user=current_user,
        show_search_box=(len(users) > 7),
        form=SearchUsersForm(),
    )