Skip to content

Conversation

@JanLuca
Copy link
Member

@JanLuca JanLuca commented Dec 2, 2017

No description provided.

@JanLuca JanLuca requested a review from fabianfreyer December 2, 2017 13:18
@fabianfreyer
Copy link
Collaborator

could you move the addition of the vendored javascript libraries into separate commit(s)? That makes the other changes easier to review.

@JanLuca
Copy link
Member Author

JanLuca commented Sep 21, 2018

@fabianfreyer Commit split up. Please review

Copy link
Collaborator

@fabianfreyer fabianfreyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code itself LGTM, modulo testing.

Some smaller, architectural notes: I'm not sure the account_management system really is the right place for this, as it's becoming a big, clunky, monolith. I'm guessing that started with integrating the registration logic, which was really a hack. Originally, this application was supposed to remain a small, slim LDAP-Backed OAuth provider with some administrative views for account management. Maybe a standalone service that authenticates against the OAuth provider and uses the appropriate scopes to verify group membership and access might be more appropriate and maintainable?

Given my other feedback is mostly just nitpicking and formalities, I'm gonna recommend merging this PR (possibly adressing my other comments - that's up to you, @JanLuca) and then at some later time separating out this and the registration logic into a separate application.

file_path = db.Column(db.Text())
comment = db.Column(db.Text())

class Batch(db.Model):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a more descriptive name here might be better, e.g. MailBatch

recipients = db.relationship("Recipient", secondary=RecipientToList, backref=db.backref('lists', lazy=True))
comment = db.Column(db.Text())

class Decision(db.Model):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly does a Decision represent? Maybe we can find better naming for this class...


{% block content %}
<div class="container">
<h1>Beschlüsse</h1>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should really start using proper i18n for this..., but that's not in scope for this PR ¯_(ツ)_/¯

msg.attach(batch.decision.filename, "application/pdf", fp.read())
conn.send(msg)

msg = Message(batch.subject, recipients=[current_app.config['MAIL_STAPF']],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being commented out? Could this be hidden behind a config variable or a check if MAIL_STAPF is even set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants