megaqc.user package

Submodules

megaqc.user.forms module

User forms.

class megaqc.user.forms.AdminForm(*args, **kwargs)[source]

Bases: flask_wtf.form.Form

active = <UnboundField(BooleanField, ('Active',), {})>[source]
email = <UnboundField(StringField, ('Email',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Email object>, <wtforms.validators.Length object>]})>[source]
first_name = <UnboundField(StringField, ('First Name',), {'validators': [<wtforms.validators.Length object>]})>[source]
is_admin = <UnboundField(BooleanField, ('Admin',), {})>[source]
last_name = <UnboundField(StringField, ('Last Name',), {'validators': [<wtforms.validators.Length object>]})>[source]
user_id = <UnboundField(HiddenField, ('id',), {})>[source]
username = <UnboundField(StringField, ('Username',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>]})>[source]
validate()[source]

Validate the form.

class megaqc.user.forms.PasswordChangeForm(*args, **kwargs)[source]

Bases: flask_wtf.form.Form

confirm = <UnboundField(PasswordField, ('Verify password', [<wtforms.validators.DataRequired object>, <wtforms.validators.EqualTo object>]), {})>[source]
password = <UnboundField(PasswordField, ('Password',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>]})>[source]
validate()[source]

Validate the form.

class megaqc.user.forms.RegisterForm(*args, **kwargs)[source]

Bases: flask_wtf.form.Form

Register form.

class Meta[source]

Bases: object

csrf = False[source]
confirm = <UnboundField(PasswordField, ('Verify password', [<wtforms.validators.DataRequired object>, <wtforms.validators.EqualTo object>]), {})>[source]
email = <UnboundField(StringField, ('Email',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Email object>, <wtforms.validators.Length object>]})>[source]
first_name = <UnboundField(StringField, ('First Name',), {'validators': [<wtforms.validators.Length object>]})>[source]
last_name = <UnboundField(StringField, ('Last Name',), {'validators': [<wtforms.validators.Length object>]})>[source]
password = <UnboundField(PasswordField, ('Password',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>]})>[source]
username = <UnboundField(StringField, ('Username',), {'validators': [<wtforms.validators.DataRequired object>, <wtforms.validators.Length object>]})>[source]
validate()[source]

Validate the form.

megaqc.user.models module

User models.

class megaqc.user.models.Role(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api.Model, megaqc.database.CRUDMixin

A role for a user.

name[source]
role_id[source]
user[source]
user_id[source]
class megaqc.user.models.User(password=None, **kwargs)[source]

Bases: sqlalchemy.orm.decl_api.Model, megaqc.database.CRUDMixin, flask_login.mixins.UserMixin

A user of the app.

active[source]
api_token[source]
check_password(value)[source]

Check password.

created_at[source]
dashboards[source]
email[source]
enforce_admin()[source]

Enforce that the first user is an active admin.

This is included as a method that isn’t automatically called, because there are cases where we don’t want this behaviour to happen, such as during testing.

favourite_plotconfigs[source]
favourite_plots[source]
filters[source]
first_name[source]
full_name[source]
get_id()[source]
is_active()[source]
is_admin[source]
is_authenticated()[source]
last_name[source]
password[source]
reports[source]
reset_password()[source]
roles[source]
salt[source]
set_password(password)[source]

Set password.

uploads[source]
user_id[source]
username[source]

megaqc.user.views module

User views.

megaqc.user.views.change_password()[source]

Change user password.

megaqc.user.views.manage_users()[source]
megaqc.user.views.multiqc_config()[source]

Instructions for MultiQC configuration.

megaqc.user.views.profile()[source]

Show user profile.

Module contents

The user module.