Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • acides/hiboo
  • frju365/hiboo
  • pascoual/hiboo
  • thedarky/hiboo
  • jeremy/hiboo
  • cyrinux/hiboo
  • a.f/hiboo
  • mickge/hiboo
  • llaq/hiboo
  • vaguelysalaried/hiboo
  • felinn-glotte/hiboo
  • AntoninDelFabbro/hiboo
  • docemmetbrown/hiboo
13 results
Show changes
Showing
with 10141 additions and 10310 deletions
...@@ -10,16 +10,24 @@ import flask ...@@ -10,16 +10,24 @@ import flask
@blueprint.route("/pick") @blueprint.route("/pick")
@security.admin_required() @security.admin_required()
def pick(): def pick():
users = models.User.query.all() page = flask.request.args.get('page', 1, type=int)
users = models.User.query.paginate(page=page, per_page=25)
form = forms.UserPickForm() form = forms.UserPickForm()
return flask.render_template("user_pick.html", users=users, form=form) return flask.render_template("user_pick.html", users=users, form=form)
@blueprint.route("/list") @blueprint.route("/list", methods=["GET", "POST"])
@security.admin_required() @security.admin_required()
def list(): def list():
users = models.User.query.all() form = utils.SearchForm()
return flask.render_template("user_list.html", users=users) page = flask.request.args.get('page', 1, type=int)
if form.validate_on_submit():
users = models.User.query.where(
models.User.name.contains(form.query.data)
).paginate(page=1, per_page=25)
else:
users = models.User.query.paginate(page=page, per_page=25)
return flask.render_template("user_list.html", users=users, form=form)
@blueprint.route("/details/<user_uuid>") @blueprint.route("/details/<user_uuid>")
...@@ -36,19 +44,19 @@ def contact_check(user_uuid): ...@@ -36,19 +44,19 @@ def contact_check(user_uuid):
form = forms.ContactCheckForm() form = forms.ContactCheckForm()
if form.validate_on_submit(): if form.validate_on_submit():
if user.contact and form.contact.data in user.contact.values(): if user.contact and form.contact.data in user.contact.values():
flask.flash(_("{} is a registred contact for user {}").format(form.contact.data, user.username), "success") flask.flash(_("{} is a registred contact for user {}").format(form.contact.data, user.name), "success")
return flask.redirect(flask.url_for(".details", user_uuid=user.uuid)) return flask.redirect(flask.url_for(".details", user_uuid=user.uuid))
else: else:
flask.flash(_("{} is not a registred contact for user {}").format(form.contact.data, user.username), "danger") flask.flash(_("{} is not a registred contact for user {}").format(form.contact.data, user.name), "danger")
return flask.redirect(flask.url_for(".contact_check", user_uuid=user.uuid)) return flask.redirect(flask.url_for(".contact_check", user_uuid=user.uuid))
if not user.contact: if not user.contact:
flask.flash(_("{} hasn't registred any contact info").format(user.username), "warning") flask.flash(_("{} hasn't registred any contact info").format(user.name), "warning")
return flask.render_template("user_contact_check.html", user=user, form=form) return flask.render_template("user_contact_check.html", user=user, form=form)
@blueprint.route("/auth/password/reset/<user_uuid>", methods=["GET", "POST"]) @blueprint.route("/auth/password/reset/<user_uuid>", methods=["GET", "POST"])
@security.admin_required() @security.admin_required()
@security.confirmation_required("generate a password reset link") @security.confirmation_required(_("generate a password reset link"))
def password_reset(user_uuid): def password_reset(user_uuid):
user = models.User.query.get(user_uuid) or flask.abort(404) user = models.User.query.get(user_uuid) or flask.abort(404)
expired = datetime.datetime.now() + datetime.timedelta(days=1) expired = datetime.datetime.now() + datetime.timedelta(days=1)
...@@ -67,7 +75,7 @@ def password_reset(user_uuid): ...@@ -67,7 +75,7 @@ def password_reset(user_uuid):
@blueprint.route("/auth/totp/reset/<user_uuid>", methods=["GET", "POST"]) @blueprint.route("/auth/totp/reset/<user_uuid>", methods=["GET", "POST"])
@security.admin_required() @security.admin_required()
@security.confirmation_required("generate a totp reset link") @security.confirmation_required(_("generate a totp reset link"))
def totp_reset(user_uuid): def totp_reset(user_uuid):
user = models.User.query.get(user_uuid) or flask.abort(404) user = models.User.query.get(user_uuid) or flask.abort(404)
expired = datetime.datetime.now() + datetime.timedelta(days=1) expired = datetime.datetime.now() + datetime.timedelta(days=1)
...@@ -86,7 +94,7 @@ def totp_reset(user_uuid): ...@@ -86,7 +94,7 @@ def totp_reset(user_uuid):
@blueprint.route("/invite", methods=["GET", "POST"]) @blueprint.route("/invite", methods=["GET", "POST"])
@security.admin_required() @security.admin_required()
@security.confirmation_required("generate a signup link") @security.confirmation_required(_("generate a signup link"))
def invite(): def invite():
expired = datetime.datetime.now() + datetime.timedelta(days=1) expired = datetime.datetime.now() + datetime.timedelta(days=1)
payload = { payload = {
...@@ -97,5 +105,5 @@ def invite(): ...@@ -97,5 +105,5 @@ def invite():
key = flask.current_app.config["SECRET_KEY"] key = flask.current_app.config["SECRET_KEY"]
token = jwt.encode(header, payload, key) token = jwt.encode(header, payload, key)
signup_link = flask.url_for("account.signup", token=token, _external=True) signup_link = flask.url_for("account.signup", token=token, _external=True)
flask.flash(_("Signup link: {}").format(signup_link), "success") flask.flash(_("Signup link:<br> <code>{}</code>").format(signup_link), "success")
return flask.redirect(flask.url_for("user.list")) return flask.redirect(flask.url_for("user.list"))
...@@ -3,10 +3,15 @@ import flask_login ...@@ -3,10 +3,15 @@ import flask_login
import flask_migrate import flask_migrate
import flask_babel import flask_babel
import flask_limiter import flask_limiter
import flask_redis import flask_caching
import babel import babel
import flask_wtf
from hiboo import models
from werkzeug import routing from werkzeug import routing
from flask_babel import lazy_gettext as _
from wtforms import fields, widgets
from markupsafe import Markup
# Login configuration # Login configuration
...@@ -76,14 +81,24 @@ def display_help(identifier): ...@@ -76,14 +81,24 @@ def display_help(identifier):
return result return result
def pending_requests():
""" Check if profiles requests are pending
"""
return models.Profile.query.filter_by(status=models.Profile.REQUEST).count()
class SearchForm(flask_wtf.FlaskForm):
""" Provide a simple search form
"""
query = fields.StringField()
submit = fields.SubmitField(_("Search"))
# Request rate limitation # Request rate limitation
limiter = flask_limiter.Limiter(key_func=lambda: current_user.id) limiter = flask_limiter.Limiter(key_func=lambda: current_user.id)
# Application translation # Application translation
translation = flask_babel.Babel()
@translation.localeselector
def get_locale(): def get_locale():
return babel.negotiate_locale( return babel.negotiate_locale(
[l.replace('-', '_') for l in flask.request.accept_languages.values()], [l.replace('-', '_') for l in flask.request.accept_languages.values()],
...@@ -91,9 +106,27 @@ def get_locale(): ...@@ -91,9 +106,27 @@ def get_locale():
) )
translation = flask_babel.Babel()
# Data migrate # Data migrate
migrate = flask_migrate.Migrate() migrate = flask_migrate.Migrate()
# Redis storage # Init cache
redis = flask_redis.FlaskRedis(strict=True, decode_responses=True) cache = flask_caching.Cache()
# Checkbox group widget for Flask forms
class CheckboxGroupWidget:
def __call__(self, field, **kwargs):
kwargs.setdefault('id', field.id)
html = [f'<div {widgets.html_params(**kwargs)}>']
for subfield in field:
html.append(f'<div class="form-check">{subfield(CLASS="form-check-input")} {subfield.label}</div>')
html.append('</div>')
return Markup("".join(html))
class MultiCheckboxField(fields.SelectMultipleField):
widget = CheckboxGroupWidget()
option_widget = widgets.CheckboxInput()
# Translations template for PROJECT. # Translations template for PROJECT.
# Copyright (C) 2023 ORGANIZATION # Copyright (C) 2025 ORGANIZATION
# This file is distributed under the same license as the PROJECT project. # This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023. # FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PROJECT VERSION\n" "Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-12-10 00:31+0100\n" "POT-Creation-Date: 2025-01-03 13:55+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n" "Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.12.1\n" "Generated-By: Babel 2.16.0\n"
#: hiboo/actions.py:80 #: hiboo/actions.py:82
msgid "cancel" msgid "cancel"
msgstr "" msgstr ""
#: hiboo/actions.py:81 #: hiboo/actions.py:83
msgid "cancel ongoing profile actions" msgid "cancel ongoing profile actions"
msgstr "" msgstr ""
#: hiboo/actions.py:96 #: hiboo/format.py:36
msgid "assign" msgid "The name must be at least {} and at most {} characters long"
msgstr ""
#: hiboo/actions.py:97
msgid "assign the profile to a user"
msgstr "" msgstr ""
#: hiboo/format.py:35 #: hiboo/format.py:44
msgid "must be at least {} and at most {} characters long" msgid "Sorry, this username is not available"
msgstr "" msgstr ""
#: hiboo/format.py:39 #: hiboo/format.py:77
msgid "must comprise only of " msgid ""
"It can only include lowercase letters, digits, dots, hyphens"
" and underscores, but may not begin or end with dots or"
" hyphens."
msgstr "" msgstr ""
#: hiboo/format.py:71 #: hiboo/format.py:90
msgid "lowercase letters, digits, dots, dashes, and underscores" msgid ""
"It can only include letters, digits, dots, hyphens and "
"underscores, but may not begin or end with dots or hyphens."
msgstr "" msgstr ""
#: hiboo/format.py:81 #: hiboo/format.py:102
msgid "letters, digits, dots, dashes and underscores" msgid ""
"It can only include letters, digits, dots, hyphens, "
"underscores and spaces, but may not begin or end with dots,"
" hyphens or spaces."
msgstr "" msgstr ""
#: hiboo/models.py:208 #: hiboo/models.py:238
msgid "Profile creation is impossible" msgid "Profile creation is impossible"
msgstr "" msgstr ""
#: hiboo/models.py:209 #: hiboo/models.py:239
msgid "Profile creation is reserved to managers" msgid "Profile creation is reserved to managers"
msgstr "" msgstr ""
#: hiboo/models.py:210 #: hiboo/models.py:240
msgid "Profile creation must be validated" msgid "Profile creation must be validated"
msgstr "" msgstr ""
#: hiboo/models.py:211 #: hiboo/models.py:241
msgid "Additional profiles must be validated" msgid "Additional profiles must be validated"
msgstr "" msgstr ""
#: hiboo/models.py:212 #: hiboo/models.py:242
msgid "No validation is required" msgid "No validation is required"
msgstr "" msgstr ""
#: hiboo/models.py:249 #: hiboo/models.py:277
msgid "unclaimed" msgid "unclaimed"
msgstr "" msgstr ""
#: hiboo/models.py:250 #: hiboo/models.py:279
msgid "requested" msgid "requested"
msgstr "" msgstr ""
#: hiboo/models.py:251 #: hiboo/models.py:281
msgid "active" msgid "active"
msgstr "" msgstr ""
#: hiboo/models.py:252 #: hiboo/models.py:283 hiboo/models.py:304
msgid "blocked" msgid "blocked"
msgstr "" msgstr ""
#: hiboo/models.py:253 #: hiboo/models.py:285 hiboo/models.py:312
msgid "deleted" msgid "deleted"
msgstr "" msgstr ""
#: hiboo/models.py:254 #: hiboo/models.py:287 hiboo/models.py:317
msgid "purged" msgid "purged"
msgstr "" msgstr ""
#: hiboo/models.py:259 #: hiboo/models.py:292
msgid "assign"
msgstr ""
#: hiboo/models.py:292
msgid "assigned"
msgstr ""
#: hiboo/models.py:292
msgid "assign this profile to a user"
msgstr ""
#: hiboo/models.py:296
msgid "activate" msgid "activate"
msgstr "" msgstr ""
#: hiboo/models.py:259 #: hiboo/models.py:296
msgid "activated"
msgstr ""
#: hiboo/models.py:296
msgid "activate this profile" msgid "activate this profile"
msgstr "" msgstr ""
#: hiboo/models.py:263 #: hiboo/models.py:300
msgid "reject" msgid "reject"
msgstr "" msgstr ""
#: hiboo/models.py:263 #: hiboo/models.py:300
msgid "rejected"
msgstr ""
#: hiboo/models.py:300
msgid "reject this request" msgid "reject this request"
msgstr "" msgstr ""
#: hiboo/models.py:267 #: hiboo/models.py:304
msgid "block" msgid "block"
msgstr "" msgstr ""
#: hiboo/models.py:267 #: hiboo/models.py:304
msgid "block this profile" msgid "block this profile"
msgstr "" msgstr ""
#: hiboo/models.py:271 #: hiboo/models.py:308
msgid "unblock" msgid "unblock"
msgstr "" msgstr ""
#: hiboo/models.py:271 #: hiboo/models.py:308
msgid "unblocked"
msgstr ""
#: hiboo/models.py:308
msgid "unblock this blocked profile" msgid "unblock this blocked profile"
msgstr "" msgstr ""
#: hiboo/models.py:275 #: hiboo/models.py:312
msgid "delete" msgid "delete"
msgstr "" msgstr ""
#: hiboo/models.py:275 #: hiboo/models.py:312
msgid "delete this profile" msgid "delete this profile"
msgstr "" msgstr ""
#: hiboo/models.py:280 #: hiboo/models.py:317
msgid "purge" msgid "purge"
msgstr "" msgstr ""
#: hiboo/models.py:280 #: hiboo/models.py:317
msgid "delete and purge this profile" msgid "delete and purge this profile"
msgstr "" msgstr ""
#: hiboo/models.py:360 #: hiboo/models.py:401
msgid "signed up for this account" msgid "signed up for this account"
msgstr "" msgstr ""
#: hiboo/models.py:361 #: hiboo/models.py:402
msgid "created the profile {this.profile.username} on {this.service.name}" msgid "created the profile {this.profile.name} on {this.service.name}"
msgstr "" msgstr ""
#: hiboo/models.py:362 #: hiboo/models.py:403
msgid "changed this account password" msgid "changed this account password"
msgstr "" msgstr ""
#: hiboo/models.py:363 #: hiboo/models.py:404
msgid "modified this account multi-factor authentication (MFA) setting" msgid "modified this account multi-factor authentication (MFA) setting"
msgstr "" msgstr ""
#: hiboo/models.py:364 #: hiboo/models.py:405
msgid "" msgid ""
"set the {this.service.name} profile {this.profile.username} as " "set the {this.service.name} profile {this.profile.name} as "
"{this.value}" "{this.value}"
msgstr "" msgstr ""
#: hiboo/models.py:365 #: hiboo/models.py:406
msgid "" msgid ""
"did {this.transition.label} the profile {this.profile.username} on " "{this.transition.label_alt} the profile {this.profile.name} on "
"{this.service.name}" "{this.service.name}"
msgstr "" msgstr ""
#: hiboo/account/forms.py:8 hiboo/account/forms.py:20 hiboo/profile/forms.py:8 #: hiboo/account/forms.py:10 hiboo/account/forms.py:24
#: hiboo/profile/forms.py:28 hiboo/profile/templates/profile_details.html:12 #: hiboo/group/templates/group_details.html:38 hiboo/profile/forms.py:8
#: hiboo/profile/forms.py:33 hiboo/profile/templates/profile_details.html:14
#: hiboo/user/templates/user_details.html:12 #: hiboo/user/templates/user_details.html:12
#: hiboo/user/templates/user_details.html:50 #: hiboo/user/templates/user_details.html:50
#: hiboo/user/templates/user_list.html:13 #: hiboo/user/templates/user_list.html:13
...@@ -178,111 +207,108 @@ msgstr "" ...@@ -178,111 +207,108 @@ msgstr ""
msgid "Username" msgid "Username"
msgstr "" msgstr ""
#: hiboo/account/forms.py:9 hiboo/account/forms.py:26 hiboo/profile/forms.py:29 #: hiboo/account/forms.py:11 hiboo/account/forms.py:28
#: hiboo/profile/forms.py:34
msgid "Password" msgid "Password"
msgstr "" msgstr ""
#: hiboo/account/forms.py:10 #: hiboo/account/forms.py:12
msgid "Remember me" msgid "Remember me"
msgstr "" msgstr ""
#: hiboo/account/forms.py:11 #: hiboo/account/forms.py:13
#: hiboo/account/templates/account_signin_password.html:3 #: hiboo/account/templates/account_signin_password.html:4
#: hiboo/profile/templates/profile_pick.html:18 hiboo/templates/base.html:32 #: hiboo/profile/templates/profile_pick.html:33 hiboo/templates/sidebar.html:56
#: hiboo/templates/sidebar.html:47
msgid "Sign in" msgid "Sign in"
msgstr "" msgstr ""
#: hiboo/account/forms.py:15 #: hiboo/account/forms.py:17
msgid "Enter the one-time password delivered by your client" msgid "Enter the one-time password delivered by your client"
msgstr "" msgstr ""
#: hiboo/account/forms.py:16 #: hiboo/account/forms.py:18
msgid "Confirm" msgid "Confirm"
msgstr "" msgstr ""
#: hiboo/account/forms.py:22 hiboo/account/forms.py:24 #: hiboo/account/forms.py:26
msgid "" msgid "The username can be between 3 and 30 characters long. {}"
"Your username must be comprised of lowercase letters, numbers "
"and '-' '_' only"
msgstr "" msgstr ""
#: hiboo/account/forms.py:27 #: hiboo/account/forms.py:29
msgid "Confirm password" msgid "Confirm password"
msgstr "" msgstr ""
#: hiboo/account/forms.py:29 #: hiboo/account/forms.py:31
msgid "Prove that you are human, copy the following text" msgid "Prove that you are human, copy the following text"
msgstr "" msgstr ""
#: hiboo/account/forms.py:30 #: hiboo/account/forms.py:32
#: hiboo/account/templates/account_signin_password.html:13 #: hiboo/account/templates/account_signin_totp.html:12
#: hiboo/account/templates/account_signin_totp.html:13 #: hiboo/account/templates/account_signup.html:4
#: hiboo/account/templates/account_signup.html:3
#: hiboo/profile/templates/profile_quick.html:6 #: hiboo/profile/templates/profile_quick.html:6
#: hiboo/profile/templates/profile_quick.html:20 #: hiboo/profile/templates/profile_quick.html:31
#: hiboo/templates/sidebar.html:42 #: hiboo/templates/sidebar.html:48
msgid "Sign up" msgid "Sign up"
msgstr "" msgstr ""
#: hiboo/account/forms.py:34 #: hiboo/account/forms.py:36
msgid "Old password" msgid "Old password"
msgstr "" msgstr ""
#: hiboo/account/forms.py:35 #: hiboo/account/forms.py:37
#: hiboo/account/templates/account_auth_password.html:3 #: hiboo/account/templates/account_auth_password.html:4
msgid "New password" msgid "New password"
msgstr "" msgstr ""
#: hiboo/account/forms.py:36 #: hiboo/account/forms.py:38
msgid "Confirm new password" msgid "Confirm new password"
msgstr "" msgstr ""
#: hiboo/account/forms.py:38 hiboo/templates/sidebar.html:31 #: hiboo/account/forms.py:40 hiboo/templates/sidebar.html:32
msgid "Change password" msgid "Change password"
msgstr "" msgstr ""
#: hiboo/account/forms.py:42 #: hiboo/account/forms.py:44
msgid "Email address" msgid "Email address"
msgstr "" msgstr ""
#: hiboo/account/forms.py:43 #: hiboo/account/forms.py:45
msgid "Matrix ID" msgid "Matrix ID"
msgstr "" msgstr ""
#: hiboo/account/forms.py:44 hiboo/account/templates/account_contact.html:3 #: hiboo/account/forms.py:46 hiboo/account/templates/account_contact.html:4
msgid "Update contact info" msgid "Update contact info"
msgstr "" msgstr ""
#: hiboo/account/login.py:29 hiboo/account/login.py:148 #: hiboo/account/login.py:25 hiboo/account/login.py:144
msgid "Wrong credentials" msgid "Wrong credentials"
msgstr "" msgstr ""
#: hiboo/account/login.py:45 #: hiboo/account/login.py:41
msgid "Wrong TOTP" msgid "Wrong TOTP"
msgstr "" msgstr ""
#: hiboo/account/login.py:70 #: hiboo/account/login.py:66
msgid "Invalid or expired signup link" msgid "Invalid or expired signup link"
msgstr "" msgstr ""
#: hiboo/account/login.py:76 #: hiboo/account/login.py:72
msgid "A user with the same username exists already" msgid "A user with the same username exists already"
msgstr "" msgstr ""
#: hiboo/account/login.py:86 #: hiboo/account/login.py:82
msgid "Signed up using the Web form" msgid "Signed up using the Web form"
msgstr "" msgstr ""
#: hiboo/account/login.py:88 #: hiboo/account/login.py:84
msgid "User created successfully" msgid "User created successfully"
msgstr "" msgstr ""
#: hiboo/account/login.py:108 hiboo/account/login.py:137 #: hiboo/account/login.py:104 hiboo/account/login.py:133
msgid "Invalid or expired reset link" msgid "Invalid or expired reset link"
msgstr "" msgstr ""
#: hiboo/account/login.py:118 hiboo/account/settings.py:25 #: hiboo/account/login.py:114 hiboo/account/settings.py:25
msgid "Successfully reset your password" msgid "Successfully reset your password"
msgstr "" msgstr ""
...@@ -316,6 +342,10 @@ msgid "" ...@@ -316,6 +342,10 @@ msgid ""
" client" " client"
msgstr "" msgstr ""
#: hiboo/account/settings.py:89
msgid "disable TOTP"
msgstr ""
#: hiboo/account/settings.py:93 #: hiboo/account/settings.py:93
msgid "TOTP has been disabled" msgid "TOTP has been disabled"
msgstr "" msgstr ""
...@@ -328,204 +358,219 @@ msgstr "" ...@@ -328,204 +358,219 @@ msgstr ""
msgid "Successfully updated your contact info" msgid "Successfully updated your contact info"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_password_reset.html:3 #: hiboo/account/templates/account_auth_password_reset.html:4
msgid "Reset your password" msgid "Reset your password"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:3 #: hiboo/account/templates/account_auth_totp.html:4
#: hiboo/account/templates/account_auth_totp_enable.html:3 #: hiboo/account/templates/account_auth_totp_enable.html:4
msgid "Two-factor authentication (2FA)" msgid "Two-factor authentication (2FA)"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:4 #: hiboo/account/templates/account_auth_totp.html:7
#: hiboo/account/templates/account_auth_totp_enable.html:4 #: hiboo/account/templates/account_auth_totp_enable.html:7
msgid "with time-based one-time password (TOTP)" msgid "with time-based one-time password (TOTP)"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:9 #: hiboo/account/templates/account_auth_totp.html:12
msgid "" msgid ""
"TOTP is an optional secondary layer of the authentication process used to" "TOTP is an optional secondary layer of the authentication\n"
" enforce the protection of your account with a one-time password. You can" " process used to enforce the protection of your account with a one-"
" read <a href=\"https://en.wikipedia.org/wiki/Time-based_one-" "time\n"
"time_password\">this Wikipedia page</a> if you want to learn more about " " password. You can read\n"
"this mechanism." " <a href=\"https://en.wikipedia.org/wiki/Time-based_one-"
"time_password\">this\n"
" Wikipedia page</a>\n"
" if you want to learn more about this mechanism."
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:18 #: hiboo/account/templates/account_auth_totp.html:22
msgid "Two-factor authentication is enabled" msgid "Two-factor authentication is enabled"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:19 #: hiboo/account/templates/account_auth_totp.html:23
msgid "Click on <i>Disable TOTP</i> to disable it" msgid "Click on <i>Disable TOTP</i> to disable it"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:25 #: hiboo/account/templates/account_auth_totp.html:27
msgid "Test your one-time password" msgid "Test your one-time password"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:26 #: hiboo/account/templates/account_auth_totp.html:28
msgid "Feel free to use this form in order to check your client configuration" msgid "Feel free to use this form in order to check your client configuration"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:39 #: hiboo/account/templates/account_auth_totp.html:37
msgid "Two-factor authentication is disabled" msgid "Two-factor authentication is disabled"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:40 #: hiboo/account/templates/account_auth_totp.html:38
msgid "Click on <i>Enable TOTP</i> to configure it" msgid "Click on <i>Enable TOTP</i> to configure it"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:44 #: hiboo/account/templates/account_auth_totp.html:41
msgid "Attention" msgid "Attention"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:45 #: hiboo/account/templates/account_auth_totp.html:42
msgid "" msgid ""
"You will need a working TOTP client in order to complete this " "You will need a working TOTP client in order to complete\n"
"configuration. Several open-source apps can help you for this (and some " " this configuration. Several open-source apps can help you for "
"on mobile are available on <a " "this\n"
"href=\"https://search.f-droid.org/?q=totp&lang=fr\">F-Droid</a>)" " (and some on mobile are available on\n"
" <a href=\"https://search.f-droid.org/?q=totp&lang=fr\">\n"
" F-Droid</a>)"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:55 #: hiboo/account/templates/account_auth_totp.html:54
msgid "Disable TOTP" msgid "Disable TOTP"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp.html:57 #: hiboo/account/templates/account_auth_totp.html:56
msgid "Enable TOTP" msgid "Enable TOTP"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp_enable.html:14 #: hiboo/account/templates/account_auth_totp_enable.html:18
msgid "Secret key" msgid "Secret key"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp_enable.html:17 #: hiboo/account/templates/account_auth_totp_enable.html:21
#: hiboo/application/templates/application_synapse/rooms.html:14 #: hiboo/application/templates/application_synapse/rooms.html:12
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp_enable.html:20 #: hiboo/account/templates/account_auth_totp_enable.html:24
msgid "Issuer" msgid "Issuer"
msgstr "" msgstr ""
#: hiboo/account/templates/account_auth_totp_enable.html:33 #: hiboo/account/templates/account_auth_totp_enable.html:35
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: hiboo/account/templates/account_home.html:3 #: hiboo/account/templates/account_home.html:4
#: hiboo/account/templates/account_profiles.html:3 #: hiboo/account/templates/account_profiles.html:4
#: hiboo/templates/sidebar.html:16 #: hiboo/templates/sidebar.html:11
msgid "My account" msgid "My account"
msgstr "" msgstr ""
#: hiboo/account/templates/account_home.html:4 #: hiboo/account/templates/account_home.html:7
msgid "status and history" msgid "status and history"
msgstr "" msgstr ""
#: hiboo/account/templates/account_home.html:12 #: hiboo/account/templates/account_home.html:16
msgid "Account age" msgid "Account age"
msgstr "" msgstr ""
#: hiboo/account/templates/account_home.html:15 #: hiboo/account/templates/account_home.html:19
msgid "Profile count" msgid "Profile count"
msgstr "" msgstr ""
#: hiboo/account/templates/account_home.html:20 #: hiboo/account/templates/account_home.html:24
msgid "Pending requests" msgid "Pending requests"
msgstr "" msgstr ""
#: hiboo/account/templates/account_home.html:23 #: hiboo/account/templates/account_home.html:27
msgid "Role" msgid "Role"
msgstr "" msgstr ""
#: hiboo/account/templates/account_home.html:23 #: hiboo/account/templates/account_home.html:27
msgid "administrator" msgid "administrator"
msgstr "" msgstr ""
#: hiboo/account/templates/account_home.html:23 #: hiboo/account/templates/account_home.html:27
msgid "registered user" msgid "registered user"
msgstr "" msgstr ""
#: hiboo/account/templates/account_profiles.html:4 #: hiboo/account/templates/account_home.html:33
#: hiboo/user/templates/user_details.html:27
msgid "Membership"
msgstr ""
#: hiboo/account/templates/account_profiles.html:7
msgid "my profiles" msgid "my profiles"
msgstr "" msgstr ""
#: hiboo/account/templates/account_profiles.html:16 #: hiboo/account/templates/account_profiles.html:23
#: hiboo/profile/templates/profile_pick.html:26
msgid "No profile description" msgid "No profile description"
msgstr "" msgstr ""
#: hiboo/account/templates/account_profiles.html:27 #: hiboo/account/templates/account_profiles.html:36
#: hiboo/profile/templates/profile_pick.html:48 #: hiboo/profile/templates/profile_pick.html:53
#: hiboo/profile/templates/profile_pick.html:52 #: hiboo/profile/templates/profile_pick.html:58
msgid "Create another profile" msgid "Create another profile"
msgstr "" msgstr ""
#: hiboo/account/templates/account_profiles.html:34 #: hiboo/account/templates/account_profiles.html:41
#: hiboo/profile/templates/profile_pick.html:50 #: hiboo/profile/templates/profile_pick.html:56
msgid "Request another profile" msgid "Request another profile"
msgstr "" msgstr ""
#: hiboo/account/templates/account_profiles.html:42 #: hiboo/account/templates/account_profiles.html:47
msgid "Claim another profile" msgid "Claim another profile"
msgstr "" msgstr ""
#: hiboo/account/templates/account_profiles.html:54 #: hiboo/account/templates/account_profiles.html:56
#, python-format #, python-format
msgid "Profile will be %(status)s in %(when)s" msgid "Profile will be %(status)s in %(when)s"
msgstr "" msgstr ""
#: hiboo/account/templates/account_signin_password.html:4 #: hiboo/account/templates/account_signin_password.html:7
#: hiboo/account/templates/account_signin_totp.html:4 #: hiboo/account/templates/account_signin_totp.html:7
msgid "to access your account" msgid "to access your account"
msgstr "" msgstr ""
#: hiboo/account/templates/account_signin_totp.html:3 #: hiboo/account/templates/account_signin_password.html:18
#, python-format
msgid ""
"If you don't already have an account, you can <a "
"href=\"%(signup_url)s\">sign up</a> now!"
msgstr ""
#: hiboo/account/templates/account_signin_totp.html:4
msgid "Time-based one-time password (TOTP) verify" msgid "Time-based one-time password (TOTP) verify"
msgstr "" msgstr ""
#: hiboo/account/templates/account_signup.html:4 #: hiboo/account/templates/account_signup.html:7
msgid "for a new account" msgid "for a new account"
msgstr "" msgstr ""
#: hiboo/application/base.py:12 hiboo/service/templates/service_details.html:15 #: hiboo/application/base.py:13 hiboo/service/templates/service_details.html:17
msgid "Service name" msgid "Service name"
msgstr "" msgstr ""
#: hiboo/application/base.py:13 hiboo/service/templates/service_details.html:21 #: hiboo/application/base.py:14 hiboo/service/templates/service_details.html:25
#: hiboo/service/templates/service_list.html:15 #: hiboo/service/templates/service_list.html:18
msgid "Provider" msgid "Provider"
msgstr "" msgstr ""
#: hiboo/application/base.py:14 hiboo/service/templates/service_details.html:18 #: hiboo/application/base.py:15 hiboo/group/forms.py:15
#: hiboo/group/templates/group_details.html:21
#: hiboo/group/templates/group_list.html:14
#: hiboo/service/templates/service_details.html:21
msgid "Description" msgid "Description"
msgstr "" msgstr ""
#: hiboo/application/base.py:15 #: hiboo/application/base.py:16
msgid "Profile policy" msgid "Profile policy"
msgstr "" msgstr ""
#: hiboo/application/base.py:17 #: hiboo/application/base.py:18
msgid "Maximum profile count" msgid "Maximum profile count"
msgstr "" msgstr ""
#: hiboo/application/base.py:19 #: hiboo/application/base.py:20
msgid "Profile username format" msgid "Profile username format"
msgstr "" msgstr ""
#: hiboo/application/base.py:21 #: hiboo/application/base.py:27
msgid "Default ({})"
msgstr ""
#: hiboo/application/base.py:30
msgid "Enable single-profile behavior (no custom username, no additional profile)" msgid "Enable single-profile behavior (no custom username, no additional profile)"
msgstr "" msgstr ""
#: hiboo/application/base.py:31 hiboo/application/infrastructure.py:15 #: hiboo/application/base.py:28 hiboo/application/infrastructure.py:15
#: hiboo/application/infrastructure.py:37 hiboo/application/social.py:20 #: hiboo/application/infrastructure.py:37 hiboo/application/social.py:20
#: hiboo/application/social.py:42 hiboo/application/social.py:167 #: hiboo/application/social.py:42 hiboo/application/social.py:167
#: hiboo/application/social.py:189 hiboo/application/social.py:210 #: hiboo/application/social.py:189 hiboo/application/social.py:210
#: hiboo/application/sso.py:43 hiboo/application/sso.py:67 #: hiboo/application/sso.py:45 hiboo/application/sso.py:69
#: hiboo/application/storage.py:19 hiboo/application/storage.py:39 #: hiboo/application/storage.py:19 hiboo/application/storage.py:39
#: hiboo/application/storage.py:62 #: hiboo/application/storage.py:62
msgid "Submit" msgid "Submit"
...@@ -580,7 +625,7 @@ msgid "Search" ...@@ -580,7 +625,7 @@ msgid "Search"
msgstr "" msgstr ""
#: hiboo/application/social.py:87 #: hiboo/application/social.py:87
#: hiboo/application/templates/application_synapse/rooms.html:11 #: hiboo/application/templates/application_synapse/rooms.html:9
msgid "RoomID" msgid "RoomID"
msgstr "" msgstr ""
...@@ -648,67 +693,67 @@ msgstr "" ...@@ -648,67 +693,67 @@ msgstr ""
msgid "Authorization Code" msgid "Authorization Code"
msgstr "" msgstr ""
#: hiboo/application/sso.py:25 #: hiboo/application/sso.py:26
msgid "Implicit" msgid "Implicit"
msgstr "" msgstr ""
#: hiboo/application/sso.py:26 #: hiboo/application/sso.py:28
msgid "Hybrid" msgid "Hybrid"
msgstr "" msgstr ""
#: hiboo/application/sso.py:30 #: hiboo/application/sso.py:32
msgid "Allowed response types" msgid "Allowed response types"
msgstr "" msgstr ""
#: hiboo/application/sso.py:31 #: hiboo/application/sso.py:33
msgid "Authorization code only" msgid "Authorization code only"
msgstr "" msgstr ""
#: hiboo/application/sso.py:32 #: hiboo/application/sso.py:34
msgid "Id token only" msgid "Id token only"
msgstr "" msgstr ""
#: hiboo/application/sso.py:33 #: hiboo/application/sso.py:35
msgid "Id token and token" msgid "Id token and token"
msgstr "" msgstr ""
#: hiboo/application/sso.py:37 #: hiboo/application/sso.py:39
msgid "Enabled special claim mappings" msgid "Enabled special claim mappings"
msgstr "" msgstr ""
#: hiboo/application/sso.py:38 #: hiboo/application/sso.py:40
msgid "Mask the profile uuid" msgid "Mask the profile uuid"
msgstr "" msgstr ""
#: hiboo/application/sso.py:39 #: hiboo/application/sso.py:41
msgid "Return the actual user email" msgid "Return the actual user email"
msgstr "" msgstr ""
#: hiboo/application/sso.py:40 #: hiboo/application/sso.py:42
msgid "Return all claims independently of asked scopes" msgid "Return all claims independently of asked scopes"
msgstr "" msgstr ""
#: hiboo/application/sso.py:56 #: hiboo/application/sso.py:58
msgid "Generic SAML2" msgid "Generic SAML2"
msgstr "" msgstr ""
#: hiboo/application/sso.py:59 #: hiboo/application/sso.py:61
msgid "SP entity id" msgid "SP entity id"
msgstr "" msgstr ""
#: hiboo/application/sso.py:60 #: hiboo/application/sso.py:62
msgid "SP ACS" msgid "SP ACS"
msgstr "" msgstr ""
#: hiboo/application/sso.py:62 #: hiboo/application/sso.py:64
msgid "Signature mode" msgid "Signature mode"
msgstr "" msgstr ""
#: hiboo/application/sso.py:63 #: hiboo/application/sso.py:65
msgid "Sign the full response" msgid "Sign the full response"
msgstr "" msgstr ""
#: hiboo/application/sso.py:64 #: hiboo/application/sso.py:66
msgid "Sign only the assertion" msgid "Sign only the assertion"
msgstr "" msgstr ""
...@@ -732,19 +777,23 @@ msgstr "" ...@@ -732,19 +777,23 @@ msgstr ""
msgid "Seafile URL" msgid "Seafile URL"
msgstr "" msgstr ""
#: hiboo/application/templates/application_oidc.html:2 #: hiboo/application/templates/application_oidc.html:4
msgid "OIDC discovery endpoint"
msgstr ""
#: hiboo/application/templates/application_oidc.html:6
msgid "Authorization endpoint" msgid "Authorization endpoint"
msgstr "" msgstr ""
#: hiboo/application/templates/application_oidc.html:5 #: hiboo/application/templates/application_oidc.html:8
msgid "Token endpoint" msgid "Token endpoint"
msgstr "" msgstr ""
#: hiboo/application/templates/application_oidc.html:8 #: hiboo/application/templates/application_oidc.html:10
msgid "Userinfo endpoint" msgid "Userinfo endpoint"
msgstr "" msgstr ""
#: hiboo/application/templates/application_oidc.html:11 #: hiboo/application/templates/application_oidc.html:12
msgid "Client ID" msgid "Client ID"
msgstr "" msgstr ""
...@@ -752,19 +801,19 @@ msgstr "" ...@@ -752,19 +801,19 @@ msgstr ""
msgid "Client secret" msgid "Client secret"
msgstr "" msgstr ""
#: hiboo/application/templates/application_pick.html:3 #: hiboo/application/templates/application_pick.html:4
msgid "Select application type" msgid "Select application type"
msgstr "" msgstr ""
#: hiboo/application/templates/application_pick.html:18 #: hiboo/application/templates/application_pick.html:19
msgid "Select" msgid "Select"
msgstr "" msgstr ""
#: hiboo/application/templates/application_saml.html:2 #: hiboo/application/templates/application_saml.html:4
msgid "SAML Metadata" msgid "SAML Metadata"
msgstr "" msgstr ""
#: hiboo/application/templates/application_saml.html:5 #: hiboo/application/templates/application_saml.html:6
msgid "SSO redirect binding" msgid "SSO redirect binding"
msgstr "" msgstr ""
...@@ -772,15 +821,15 @@ msgstr "" ...@@ -772,15 +821,15 @@ msgstr ""
msgid "ACS" msgid "ACS"
msgstr "" msgstr ""
#: hiboo/application/templates/application_saml.html:11 #: hiboo/application/templates/application_saml.html:10
msgid "IDP certificate" msgid "IDP certificate"
msgstr "" msgstr ""
#: hiboo/application/templates/application_saml.html:14 #: hiboo/application/templates/application_saml.html:12
msgid ">SP certificate" msgid "SP certificate"
msgstr "" msgstr ""
#: hiboo/application/templates/application_saml.html:17 #: hiboo/application/templates/application_saml.html:14
msgid "SP private key" msgid "SP private key"
msgstr "" msgstr ""
...@@ -792,39 +841,241 @@ msgstr "" ...@@ -792,39 +841,241 @@ msgstr ""
msgid "Thumbnail" msgid "Thumbnail"
msgstr "" msgstr ""
#: hiboo/application/templates/application_synapse/room.html:19 #: hiboo/application/templates/application_synapse/room.html:20
msgid "Member" msgid "Member"
msgstr "" msgstr ""
#: hiboo/application/templates/application_synapse/rooms.html:12 #: hiboo/application/templates/application_synapse/rooms.html:10
msgid "Alias" msgid "Alias"
msgstr "" msgstr ""
#: hiboo/application/templates/application_synapse/rooms.html:13 #: hiboo/application/templates/application_synapse/rooms.html:11
msgid "Version" msgid "Version"
msgstr "" msgstr ""
#: hiboo/application/templates/application_synapse/rooms.html:15 #: hiboo/application/templates/application_synapse/rooms.html:13
msgid "Members (local)" msgid "Members (local)"
msgstr "" msgstr ""
#: hiboo/application/templates/application_synapse/rooms.html:16 #: hiboo/application/templates/application_synapse/rooms.html:14
msgid "Properties" msgid "Properties"
msgstr "" msgstr ""
#: hiboo/application/templates/application_synapse/user.html:21 #: hiboo/application/templates/application_synapse/user.html:23
msgid "Devices" msgid "Devices"
msgstr "" msgstr ""
#: hiboo/group/forms.py:11
msgid "Group name"
msgstr ""
#: hiboo/group/forms.py:16 hiboo/group/templates/group_details.html:63
msgid "Edit group"
msgstr ""
#: hiboo/group/forms.py:19
msgid "Available users"
msgstr ""
#: hiboo/group/forms.py:20
msgid "Users already in the group"
msgstr ""
#: hiboo/group/forms.py:21
msgid "Update group memberships"
msgstr ""
#: hiboo/group/views.py:12
msgid "Create"
msgstr ""
#: hiboo/group/views.py:16
msgid "A group with the same name exists already"
msgstr ""
#: hiboo/group/views.py:23
msgid "Group created successfully"
msgstr ""
#: hiboo/group/views.py:30
msgid "Delete the group"
msgstr ""
#: hiboo/group/views.py:36
msgid "Group {} was deleted"
msgstr ""
#: hiboo/group/templates/group_list.html:33 hiboo/group/views.py:56
#: hiboo/service/templates/service_list.html:38
msgid "Edit"
msgstr ""
#: hiboo/group/views.py:62
msgid "Group {} was renamed to {}"
msgstr ""
#: hiboo/group/views.py:69
msgid "Group successfully updated"
msgstr ""
#: hiboo/group/views.py:93
msgid "User {} was added to the group {}"
msgstr ""
#: hiboo/group/views.py:102
msgid "User {} was removed from the group {}"
msgstr ""
#: hiboo/group/views.py:112
msgid "Group memberships successfully updated"
msgstr ""
#: hiboo/group/templates/group_create.html:3
#: hiboo/group/templates/group_list.html:46
msgid "Create a group"
msgstr ""
#: hiboo/group/templates/group_details.html:4
msgid "group details"
msgstr ""
#: hiboo/group/templates/group_details.html:11
#: hiboo/service/templates/service_details.html:13
msgid "Attributes"
msgstr ""
#: hiboo/group/templates/group_details.html:15
msgid "groupname"
msgstr ""
#: hiboo/group/templates/group_details.html:17
#: hiboo/profile/templates/profile_details.html:24
#: hiboo/profile/templates/profile_list.html:20
#: hiboo/service/templates/service_details.html:37
#: hiboo/user/templates/user_details.html:15
msgid "UUID"
msgstr ""
#: hiboo/group/templates/group_details.html:39 hiboo/templates/sidebar.html:82
#: hiboo/user/templates/user_list.html:14
msgid "Groups"
msgstr ""
#: hiboo/group/templates/group_details.html:40
#: hiboo/user/templates/user_details.html:24
#: hiboo/user/templates/user_list.html:15
msgid "Auth. methods"
msgstr ""
#: hiboo/group/templates/group_details.html:41
#: hiboo/moderation/templates/moderation_home.html:17
#: hiboo/profile/templates/profile_list.html:22
#: hiboo/user/templates/user_list.html:16
#: hiboo/user/templates/user_pick.html:14
msgid "Created on"
msgstr ""
#: hiboo/group/templates/group_details.html:62
msgid "Manage members"
msgstr ""
#: hiboo/group/templates/group_details.html:64
msgid "Delete group"
msgstr ""
#: hiboo/group/templates/group_edit.html:3
msgid "Edit a group"
msgstr ""
#: hiboo/group/templates/group_list.html:3
msgid "Group list"
msgstr ""
#: hiboo/group/templates/group_list.html:4
msgid "all available groups"
msgstr ""
#: hiboo/group/templates/group_list.html:13
msgid "Group"
msgstr ""
#: hiboo/group/templates/group_list.html:15
#: hiboo/group/templates/group_list.html:32
msgid "Members"
msgstr ""
#: hiboo/group/templates/group_list.html:16
#: hiboo/moderation/templates/moderation_home.html:19
#: hiboo/profile/templates/profile_list.html:23
#: hiboo/service/templates/service_details.html:49
#: hiboo/service/templates/service_list.html:22
msgid "Actions"
msgstr ""
#: hiboo/group/templates/group_list.html:34
msgid "Delete"
msgstr ""
#: hiboo/group/templates/group_membership.html:4
msgid "Manage members of group"
msgstr ""
#: hiboo/moderation/templates/moderation_home.html:3
#: hiboo/templates/sidebar.html:89
msgid "Moderation"
msgstr ""
#: hiboo/moderation/templates/moderation_home.html:9
msgid "Pending profiles"
msgstr ""
#: hiboo/moderation/templates/moderation_home.html:14
#: hiboo/profile/templates/profile_list.html:16
#: hiboo/service/templates/service_list.html:17
#: hiboo/user/templates/user_details.html:49
msgid "Service"
msgstr ""
#: hiboo/moderation/templates/moderation_home.html:15
#: hiboo/profile/templates/profile_list.html:18
msgid "Profile username"
msgstr ""
#: hiboo/moderation/templates/moderation_home.html:16
#: hiboo/profile/templates/profile_list.html:19
msgid "Owned by"
msgstr ""
#: hiboo/moderation/templates/moderation_home.html:18
#: hiboo/profile/templates/profile_details.html:28
#: hiboo/profile/templates/profile_list.html:21
#: hiboo/user/templates/user_details.html:51
msgid "Status"
msgstr ""
#: hiboo/moderation/templates/moderation_home.html:46
msgid "Activity"
msgstr ""
#: hiboo/profile/forms.py:9 #: hiboo/profile/forms.py:9
msgid "Comment" msgid "Comment"
msgstr "" msgstr ""
#: hiboo/profile/forms.py:10 hiboo/profile/templates/profile_list.html:66 #: hiboo/profile/forms.py:11
msgid "Username spoof protection"
msgstr ""
#: hiboo/profile/forms.py:12
msgid ""
"Prevent to register a profile username that case-insensitively exists in "
"user database"
msgstr ""
#: hiboo/profile/forms.py:15 hiboo/profile/templates/profile_list.html:60
msgid "Create profile" msgid "Create profile"
msgstr "" msgstr ""
#: hiboo/profile/forms.py:30 hiboo/profile/templates/profile_claim.html:4 #: hiboo/profile/forms.py:35 hiboo/profile/templates/profile_claim.html:5
msgid "Claim profile" msgid "Claim profile"
msgstr "" msgstr ""
...@@ -837,158 +1088,121 @@ msgid "You already own a profile for this service" ...@@ -837,158 +1088,121 @@ msgid "You already own a profile for this service"
msgstr "" msgstr ""
#: hiboo/profile/views.py:38 #: hiboo/profile/views.py:38
msgid "Your reached the maximum number of profiles" msgid "You have reached the maximum number of profiles"
msgstr "" msgstr ""
#: hiboo/profile/views.py:45 #: hiboo/profile/views.py:45
msgid "Your profile creation requires approval, please contact us!" msgid ""
"The creation of your profile requires approval, so don't forget to "
"contact us after filling in the form"
msgstr "" msgstr ""
#: hiboo/profile/views.py:62 #: hiboo/profile/views.py:80
msgid "A profile with that username exists already" msgid "A profile with that username exists already"
msgstr "" msgstr ""
#: hiboo/profile/views.py:130 #: hiboo/profile/views.py:136
msgid "Successfully claimed the profile!" msgid "Successfully claimed the profile!"
msgstr "" msgstr ""
#: hiboo/profile/views.py:133 #: hiboo/profile/views.py:139
msgid "Wrong username or password" msgid "Wrong username or password"
msgstr "" msgstr ""
#: hiboo/profile/views.py:200 #: hiboo/profile/views.py:181
msgid "change the profile status"
msgstr ""
#: hiboo/profile/views.py:202
msgid "Profile status change was requested" msgid "Profile status change was requested"
msgstr "" msgstr ""
#: hiboo/profile/views.py:216 #: hiboo/profile/views.py:210
msgid "Profile status change was cancelled" msgid "cancel the profile status change"
msgstr "" msgstr ""
#: hiboo/profile/views.py:228 #: hiboo/profile/views.py:218
msgid "Profile status change was completed" msgid "Profile status change was cancelled"
msgstr "" msgstr ""
#: hiboo/profile/views.py:250 #: hiboo/profile/views.py:230
msgid "Successfully assigned the profile" msgid "Profile status change was completed"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_action.html:18 #: hiboo/profile/templates/profile_action.html:18
msgid "Show profile" msgid "Show profile"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_claim.html:5 #: hiboo/profile/templates/profile_claim.html:8
#: hiboo/profile/templates/profile_create.html:6 #: hiboo/profile/templates/profile_create.html:8
#: hiboo/profile/templates/profile_pick.html:5 #: hiboo/profile/templates/profile_pick.html:8
#: hiboo/profile/templates/profile_quick.html:8 #: hiboo/profile/templates/profile_quick.html:9
#, python-format #, python-format
msgid "for the service %(service_name)s" msgid "for the service %(service_name)s"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_create.html:4 #: hiboo/profile/templates/profile_create.html:5
msgid "New profile" msgid "New profile"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_create.html:7 #: hiboo/profile/templates/profile_create.html:10
msgid "and user" msgid "and user"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_details.html:4 #: hiboo/profile/templates/profile_details.html:5
msgid "profile details" msgid "profile details"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_details.html:16 #: hiboo/profile/templates/profile_details.html:19
msgid "Owner" msgid "Owner"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_details.html:20 #: hiboo/profile/templates/profile_details.html:32
#: hiboo/profile/templates/profile_list.html:27
#: hiboo/service/templates/service_details.html:30
#: hiboo/user/templates/user_details.html:15
msgid "UUID"
msgstr ""
#: hiboo/profile/templates/profile_details.html:23
#: hiboo/profile/templates/profile_list.html:28
#: hiboo/user/templates/user_details.html:51
msgid "Status"
msgstr ""
#: hiboo/profile/templates/profile_details.html:26
#: hiboo/user/templates/user_details.html:18 #: hiboo/user/templates/user_details.html:18
msgid "Created at" msgid "Created at"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_list.html:7 #: hiboo/profile/templates/profile_list.html:6
msgid "profiles" msgid "profile list"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_list.html:23 #: hiboo/profile/templates/profile_list.html:58
#: hiboo/service/templates/service_list.html:14
#: hiboo/user/templates/user_details.html:49
msgid "Service"
msgstr ""
#: hiboo/profile/templates/profile_list.html:25
msgid "Profile username"
msgstr ""
#: hiboo/profile/templates/profile_list.html:26
msgid "Owned by"
msgstr ""
#: hiboo/profile/templates/profile_list.html:29
#: hiboo/user/templates/user_list.html:14
#: hiboo/user/templates/user_pick.html:14
msgid "Created on"
msgstr ""
#: hiboo/profile/templates/profile_list.html:30
#: hiboo/service/templates/service_details.html:39
#: hiboo/service/templates/service_list.html:19
msgid "Actions"
msgstr ""
#: hiboo/profile/templates/profile_list.html:65
msgid "Export unclaimed profiles" msgid "Export unclaimed profiles"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_pick.html:4 #: hiboo/profile/templates/profile_pick.html:5
msgid "Pick a profile" msgid "Pick a profile"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_pick.html:32 #: hiboo/profile/templates/profile_pick.html:23
#, python-format #, python-format
msgid "Created on %(created_on)s" msgid "Created on %(created_on)s"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_pick.html:33 #: hiboo/profile/templates/profile_pick.html:49
msgid "Not shared with anyone" #: hiboo/profile/templates/profile_quick.html:41
msgstr ""
#: hiboo/profile/templates/profile_pick.html:45
#: hiboo/profile/templates/profile_quick.html:39
msgid "Claim a profile" msgid "Claim a profile"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_quick.html:24 #: hiboo/profile/templates/profile_quick.html:18
#, python-format #, python-format
msgid "Your new %(service_name)s profile" msgid "Your new %(service_name)s profile"
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_quick.html:27 #: hiboo/profile/templates/profile_quick.html:22
#, python-format #, python-format
msgid "" msgid ""
"Please click the \"Sign up\" button to initialize your %(service_name)s " "Please click the \"Sign up\" button to initialize your %(service_name)s "
"account." "account."
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_quick.html:29 #: hiboo/profile/templates/profile_quick.html:25
msgid "" msgid ""
"If you wish to pick a different username, please click the \"Custom " "If you wish to pick a different username, please click the \"Create a "
"profile\" button." "custom profile\" button."
msgstr "" msgstr ""
#: hiboo/profile/templates/profile_quick.html:42 #: hiboo/profile/templates/profile_quick.html:44
msgid "Create a custom profile" msgid "Create a custom profile"
msgstr "" msgstr ""
...@@ -1000,161 +1214,154 @@ msgstr "" ...@@ -1000,161 +1214,154 @@ msgstr ""
msgid "Service successfully updated" msgid "Service successfully updated"
msgstr "" msgstr ""
#: hiboo/service/templates/service_action.html:18 #: hiboo/service/views.py:72
msgid "delete the service"
msgstr ""
#: hiboo/service/views.py:106
msgid "change the service application template"
msgstr ""
#: hiboo/service/templates/service_action.html:17
msgid "Show service" msgid "Show service"
msgstr "" msgstr ""
#: hiboo/service/templates/service_create.html:4 #: hiboo/service/templates/service_create.html:5
#: hiboo/service/templates/service_list.html:51 #: hiboo/service/templates/service_list.html:56
msgid "Create a service" msgid "Create a service"
msgstr "" msgstr ""
#: hiboo/service/templates/service_create.html:5 #: hiboo/service/templates/service_create.html:8
#, python-format #, python-format
msgid "add a %(application_name)s service" msgid "add a %(application_name)s service"
msgstr "" msgstr ""
#: hiboo/service/templates/service_details.html:4 #: hiboo/service/templates/service_details.html:5
msgid "service details" msgid "service details"
msgstr "" msgstr ""
#: hiboo/service/templates/service_details.html:11 #: hiboo/service/templates/service_details.html:29
msgid "Attributes" #: hiboo/service/templates/service_list.html:19
msgstr ""
#: hiboo/service/templates/service_details.html:24
#: hiboo/service/templates/service_list.html:16
msgid "Application" msgid "Application"
msgstr "" msgstr ""
#: hiboo/service/templates/service_details.html:27 #: hiboo/service/templates/service_details.html:33
msgid "Application destriction" msgid "Application destriction"
msgstr "" msgstr ""
#: hiboo/service/templates/service_details.html:70 #: hiboo/service/templates/service_details.html:89
msgid "View profiles" msgid "View profiles"
msgstr "" msgstr ""
#: hiboo/service/templates/service_details.html:71 #: hiboo/service/templates/service_details.html:91
msgid "Change application" msgid "Edit this service"
msgstr "" msgstr ""
#: hiboo/service/templates/service_details.html:72 #: hiboo/service/templates/service_details.html:93
msgid "Edit this service" msgid "Change application"
msgstr "" msgstr ""
#: hiboo/service/templates/service_details.html:73 #: hiboo/service/templates/service_details.html:95
msgid "Delete this service" msgid "Delete this service"
msgstr "" msgstr ""
#: hiboo/service/templates/service_edit.html:3 #: hiboo/service/templates/service_edit.html:4
msgid "Edit a service" msgid "Edit a service"
msgstr "" msgstr ""
#: hiboo/service/templates/service_list.html:3 #: hiboo/service/templates/service_list.html:4
msgid "Service list" msgid "Service list"
msgstr "" msgstr ""
#: hiboo/service/templates/service_list.html:4 #: hiboo/service/templates/service_list.html:7
msgid "all available services" msgid "all available services"
msgstr "" msgstr ""
#: hiboo/service/templates/service_list.html:17 #: hiboo/service/templates/service_list.html:20
msgid "Policy" msgid "Policy"
msgstr "" msgstr ""
#: hiboo/service/templates/service_list.html:18 #: hiboo/service/templates/service_list.html:21
msgid "Max profiles" msgid "Max profiles"
msgstr "" msgstr ""
#: hiboo/service/templates/service_list.html:32 #: hiboo/service/templates/service_list.html:37
msgid "Profiles" msgid "Profiles"
msgstr "" msgstr ""
#: hiboo/service/templates/service_list.html:33
msgid "Edit"
msgstr ""
#: hiboo/sso/templates/sso_redirect.html:8 #: hiboo/sso/templates/sso_redirect.html:8
msgid "" msgid ""
"Since your browser does not support JavaScript, you must press the button" "Since your browser does not support JavaScript, you must press the button"
" once to proceed." " once to proceed."
msgstr "" msgstr ""
#: hiboo/templates/base.html:19 #: hiboo/templates/base.html:56
msgid "Toggle navigation" msgid "Toggle navigation"
msgstr "" msgstr ""
#: hiboo/templates/base.html:79 #: hiboo/templates/base.html:92
msgid "Your account has no active profile, it will be deleted in" #, python-format
msgid "Your account has no active profile, it will be deleted in %(timedelta)s"
msgstr "" msgstr ""
#: hiboo/templates/base.html:87 #: hiboo/templates/base.html:101
msgid "Hiboo is free software distributed under the MIT license" msgid ""
"<a href=\"https://forge.tedomum.net/acides/hiboo\">Hiboo</a> is free "
"software distributed under the <a "
"href=\"https://forge.tedomum.net/acides/hiboo/-/raw/main/LICENSE\">GPLv3</a>"
" license"
msgstr "" msgstr ""
#: hiboo/templates/confirm.html:3 #: hiboo/templates/confirm.html:4
msgid "Confirm your action" msgid "Confirm your action"
msgstr "" msgstr ""
#: hiboo/templates/confirm.html:8 #: hiboo/templates/confirm.html:9
#, python-format #, python-format
msgid "Your are about to %(action)s. Do you wish to confirm that action?" msgid "Your are about to %(action)s. Do you wish to confirm that action?"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:4 #: hiboo/templates/sidebar.html:5
msgid "Dark theme"
msgstr ""
#: hiboo/templates/sidebar.html:13
msgid "Account" msgid "Account"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:21 #: hiboo/templates/sidebar.html:18
msgid "My profiles" msgid "My profiles"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:26 #: hiboo/templates/sidebar.html:25
msgid "My contact info" msgid "My contact info"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:36 #: hiboo/templates/sidebar.html:39
msgid "Two-factor authentication" msgid "Two-factor authentication"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:53 #: hiboo/templates/sidebar.html:62
msgid "Admin" msgid "Admin"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:56 #: hiboo/templates/sidebar.html:68
msgid "Services" msgid "Services"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:61 #: hiboo/templates/sidebar.html:75
msgid "Users" msgid "Users"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:66 #: hiboo/templates/sidebar.html:97
msgid "Requested profiles"
msgstr ""
#: hiboo/templates/sidebar.html:71
msgid "Blocked profiles"
msgstr ""
#: hiboo/templates/sidebar.html:76
msgid "About" msgid "About"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:79 #: hiboo/templates/sidebar.html:104
msgid "User guide" msgid "User guide"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:84 #: hiboo/templates/sidebar.html:110
msgid "Admin guide" msgid "Admin guide"
msgstr "" msgstr ""
#: hiboo/templates/sidebar.html:92 #: hiboo/templates/sidebar.html:119
msgid "Sign out" msgid "Sign out"
msgstr "" msgstr ""
...@@ -1178,12 +1385,24 @@ msgstr "" ...@@ -1178,12 +1385,24 @@ msgstr ""
msgid "{} hasn't registred any contact info" msgid "{} hasn't registred any contact info"
msgstr "" msgstr ""
#: hiboo/user/views.py:51
msgid "generate a password reset link"
msgstr ""
#: hiboo/user/views.py:64 hiboo/user/views.py:83 #: hiboo/user/views.py:64 hiboo/user/views.py:83
msgid "Reset link: {}" msgid "Reset link: {}"
msgstr "" msgstr ""
#: hiboo/user/views.py:70
msgid "generate a totp reset link"
msgstr ""
#: hiboo/user/views.py:89
msgid "generate a signup link"
msgstr ""
#: hiboo/user/views.py:100 #: hiboo/user/views.py:100
msgid "Signup link: {}" msgid "Signup link:<br> <code>{}</code>"
msgstr "" msgstr ""
#: hiboo/user/templates/user_contact_check.html:4 #: hiboo/user/templates/user_contact_check.html:4
...@@ -1202,13 +1421,12 @@ msgstr "" ...@@ -1202,13 +1421,12 @@ msgstr ""
msgid "Updated at" msgid "Updated at"
msgstr "" msgstr ""
#: hiboo/user/templates/user_details.html:24 #: hiboo/user/templates/user_details.html:31
#: hiboo/user/templates/user_list.html:15 msgid "Deleted in"
msgid "Auth. methods"
msgstr "" msgstr ""
#: hiboo/user/templates/user_details.html:28 #: hiboo/user/templates/user_details.html:44
msgid "Deleted in" msgid "Profile list"
msgstr "" msgstr ""
#: hiboo/user/templates/user_details.html:71 #: hiboo/user/templates/user_details.html:71
...@@ -1227,7 +1445,7 @@ msgstr "" ...@@ -1227,7 +1445,7 @@ msgstr ""
msgid "Manage users" msgid "Manage users"
msgstr "" msgstr ""
#: hiboo/user/templates/user_list.html:35 #: hiboo/user/templates/user_list.html:37
msgid "Invitation link" msgid "Invitation link"
msgstr "" msgstr ""
......
""" update and set empty service.profile_format to server_default 'lowercase'
Revision ID: 0147b747696e
Revises: f9130c1a10f7
Create Date: 2024-09-30 18:10:42.200989
"""
from alembic import op
import sqlalchemy as sa
import hiboo
revision = "0147b747696e"
down_revision = "f9130c1a10f7"
branch_labels = None
depends_on = None
service_table = sa.Table(
"service", sa.MetaData(), sa.Column("profile_format", sa.String(length=255))
)
def upgrade():
with op.batch_alter_table("service") as batch_op:
batch_op.alter_column(
"profile_format",
existing_type=sa.String(length=255),
server_default="lowercase",
nullable=False,
)
connection = op.get_bind()
connection.execute(
service_table.update()
.where(service_table.c.profile_format == "")
.values(profile_format="lowercase")
)
def downgrade():
with op.batch_alter_table("service") as batch_op:
batch_op.alter_column(
"profile_format",
existing_type=sa.String(length=255),
server_default=None,
nullable=True,
)
""" rename attribut username to name
Revision ID: 130f47ff65a4
Revises: 46ae534e284f
Create Date: 2025-02-27 15:08:43.767378
"""
from alembic import op
import sqlalchemy as sa
import hiboo
revision = "130f47ff65a4"
down_revision = "2e3cb3f74078"
branch_labels = None
depends_on = None
def upgrade():
with op.batch_alter_table("user") as batch_op:
batch_op.alter_column(
"username",
new_column_name="name",
existing_type=sa.String(length=255),
existing_nullable=False,
)
with op.batch_alter_table("profile") as batch_op:
batch_op.alter_column(
"username",
new_column_name="name",
existing_type=sa.String(length=255),
existing_nullable=False,
)
with op.batch_alter_table("claimname") as batch_op:
batch_op.alter_column(
"username",
new_column_name="name",
existing_type=sa.String(length=255),
existing_nullable=False,
)
def downgrade():
with op.batch_alter_table("user") as batch_op:
batch_op.alter_column(
"name",
new_column_name="username",
existing_type=sa.String(length=255),
existing_nullable=False,
)
with op.batch_alter_table("profile") as batch_op:
batch_op.alter_column(
"name",
new_column_name="username",
existing_type=sa.String(length=255),
existing_nullable=False,
)
with op.batch_alter_table("claimname") as batch_op:
batch_op.alter_column(
"name",
new_column_name="username",
existing_type=sa.String(length=255),
existing_nullable=False,
)
""" cleanup remaining stepless transitions
Revision ID: 2e3cb3f74078
Revises: 46ae534e284f
Create Date: 2025-02-27 19:37:02.844616
"""
from alembic import op
import sqlalchemy as sa
import hiboo
revision = "2e3cb3f74078"
down_revision = "46ae534e284f"
branch_labels = None
depends_on = None
profile_table = sa.Table(
"profile",
sa.MetaData(),
sa.Column("transition", sa.String(length=25)),
sa.Column("transition_step", sa.String(length=25)),
)
def upgrade():
connection = op.get_bind()
connection.execute(
profile_table.update()
.where(
sa.and_(
profile_table.c.transition.is_not(None),
profile_table.c.transition_step.is_(None),
)
)
.values(transition=None)
)
def downgrade():
"""I don't think there will be a return journey"""
pass
""" add groups and membership tables, modify history table to log groups events
Revision ID: 46ae534e284f
Revises: 8652789edda9
Create Date: 2025-01-03 00:49:32.611090
"""
from alembic import op
import sqlalchemy as sa
import hiboo
revision = '46ae534e284f'
down_revision = '8652789edda9'
branch_labels = None
depends_on = None
def upgrade():
op.create_table('group',
sa.Column('groupname', sa.String(length=255), nullable=False),
sa.Column('uuid', sa.String(length=36), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.Column('updated_at', sa.DateTime(), nullable=True),
sa.Column('comment', sa.String(length=255), nullable=True),
sa.PrimaryKeyConstraint('uuid', name=op.f('group_pkey')),
sa.UniqueConstraint('groupname')
)
op.create_table('membership',
sa.Column('user_uuid', sa.String(length=36), nullable=False),
sa.Column('group_uuid', sa.String(length=36), nullable=False),
sa.ForeignKeyConstraint(['group_uuid'], ['group.uuid'], name=op.f('membership_group_uuid_fkey')),
sa.ForeignKeyConstraint(['user_uuid'], ['user.uuid'], name=op.f('membership_user_uuid_fkey')),
sa.PrimaryKeyConstraint('user_uuid', 'group_uuid', name=op.f('membership_pkey'))
)
with op.batch_alter_table('history', schema=None) as batch_op:
batch_op.add_column(sa.Column('group_uuid', sa.String(length=36), nullable=True))
batch_op.create_foreign_key(batch_op.f('history_group_uuid_fkey'), 'group', ['group_uuid'], ['uuid'])
def downgrade():
with op.batch_alter_table('history', schema=None) as batch_op:
batch_op.drop_constraint(batch_op.f('history_group_uuid_fkey'), type_='foreignkey')
batch_op.drop_column('group_uuid')
op.drop_table('membership')
op.drop_table('group')
""" update obselete transition names in history
Revision ID: 8652789edda9
Revises: 0147b747696e
Create Date: 2024-10-01 01:18:46.781652
"""
from alembic import op
import sqlalchemy as sa
import hiboo
revision = "8652789edda9"
down_revision = "0147b747696e"
branch_labels = None
depends_on = None
history_table = sa.Table(
"history",
sa.MetaData(),
sa.Column("category", sa.String(length=25), nullable=True),
sa.Column("value", sa.String(), nullable=True),
)
def upgrade():
connection = op.get_bind()
connection.execute(
history_table.update()
.where(
sa.and_(
history_table.c.category == "transition",
sa.or_(
history_table.c.value == "purge-deleted",
history_table.c.value == "purge-blocked",
),
)
)
.values(value="purge")
)
connection.execute(
history_table.update()
.where(
sa.and_(
history_table.c.category == "transition",
history_table.c.value == "delete-blocked",
)
)
.values(value="delete")
)
def downgrade():
"""I don't think there will be a return journey"""
pass
site_name: Hiboo - Documentation
site_description: Security framework for small-sized hosting services
site_author: The Hiboo contributors
docs_dir: docs/content/
site_dir: hiboo/static/docs
repo_url: https://forge.tedomum.net/acides/hiboo/-/tree/dev/docs
copyright: <a href="https://forge.tedomum.net/acides/hiboo/-/graphs/master">Hiboo contributors</a>
theme:
name: mkdocs
language: en
custom_dir: docs/templates
markdown_extensions:
- pymdownx.blocks.admonition
- toc:
baselevel: 3
nav:
- User Manual: "user_manual/index.md"
- Admin Manual: "admin_manual/index.md"
- Changelog: "CHANGELOG.md"
plugins:
- search
- i18n:
docs_structure: folder
languages:
- locale: en
default: true
name: English
bruild: true
- locale: fr
name: Français
build: true
nav_translations:
User Manual: Utilisation
Admin Manual: Administration
Source diff could not be displayed: it is too large. Options to address this: view the blob.
{ {
"name": "hiboo", "name": "hiboo",
"version": "1.0.0", "version": "0.1.1",
"description": "Hiboo", "description": "Hiboo",
"main": "assest/index.js", "main": "assest/index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1",
"release": "release-it"
}, },
"author": "", "author": "Hiboo contributors",
"license": "ISC", "license": "GPLv3",
"dependencies": { "dependencies": {
"@babel/core": "^7.21.0", "@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2", "@babel/preset-env": "^7.20.2",
"@popperjs/core": "^2.11.6",
"admin-lte": "^3.1.0",
"babel-loader": "^9.1.2", "babel-loader": "^9.1.2",
"bootstrap-icons": "^1.11.3",
"compression-webpack-plugin": "^10.0.0",
"css-loader": "^6.7.3", "css-loader": "^6.7.3",
"expose-loader": "^4.0.0",
"mini-css-extract-plugin": "^2.7.2",
"css-minimizer-webpack-plugin": "^4.2.2", "css-minimizer-webpack-plugin": "^4.2.2",
"compression-webpack-plugin": "^10.0.0", "expose-loader": "^4.0.0",
"import-glob": "^1.5.0", "import-glob": "^1.5.0",
"mini-css-extract-plugin": "^2.7.2",
"sass": "^1.58.3", "sass": "^1.58.3",
"sass-loader": "^13.2.0", "sass-loader": "^13.2.0",
"select2": "^4.1.0-rc.0",
"url-loader": "^4.1.1", "url-loader": "^4.1.1",
"webpack": "^5.75.0", "webpack": "^5.75.0",
"webpack-cli": "^5.0.1" "webpack-cli": "^5.0.1"
},
"devDependencies": {
"@release-it/bumper": "^6.0.1",
"@release-it/conventional-changelog": "^8.0.1",
"release-it": "^17.6.0"
} }
} }
Source diff could not be displayed: it is too large. Options to address this: view the blob.
[tool.poetry] [tool.poetry]
name = "Hiboo" name = "Hiboo"
version = "0.1.0" version = "0.1.1"
description = "Security framework for small-sized hosting services" description = "Security framework for small-sized hosting services"
homepage = "https://forge.tedomum.net/acides/hiboo" homepage = "https://forge.tedomum.net/acides/hiboo"
repository = "https://forge.tedomum.net/acides/hiboo" repository = "https://forge.tedomum.net/acides/hiboo"
documentation = "https://acides.org/docs/hiboo/" documentation = "https://acides.org/docs/hiboo/"
readme = "README.md" readme = "README.md"
license = "AGPLv3" license = "GPLv3"
authors = [ authors = [
"kaiyou <pierre@jaury.eu>", "kaiyou <pierre@jaury.eu>",
"Angedestenebres <angedestenebres@tugaleres.com>", "Angedestenebres <angedestenebres@tugaleres.com>",
"Jae Beojkkoch <jae@jaekr.me>", "Jae Beojkkoch <jae@jaekr.me>",
"Stéphane Burdin <steph@tux.tf>", "Stéphane Burdin <steph@tux.tf>",
"Julien GD <abld@abld.info>", "Julien GD <abld@abld.info>",
"prichier <pascoualito@gmail.com>", "prichier <pascoualito@gmail.com>",
"laurent doreille <laurent.doreille@protonmail.com>", "laurent doreille <laurent.doreille@protonmail.com>",
"pascoual <f29f4abd-9ea2-4b4c-89f5-30fa23e29a43@users.tedomum.net>", "pascoual <f29f4abd-9ea2-4b4c-89f5-30fa23e29a43@users.tedomum.net>",
"Jeremy <jeremyg@zaclys.net>", "Jeremy <jeremyg@zaclys.net>",
"Jae <jae@jae.moe>", "Jae <jae@jae.moe>",
"ornanovitch <ornanovitch@felinn.org>", "ornanovitch <ornanovitch@felinn.org>",
"f00wl <f00wl@felinn.org>", "f00wl <f00wl@felinn.org>",
"Le Libre Au Quotidien <contact@lelibreauquotidien.fr>", "Le Libre Au Quotidien <contact@lelibreauquotidien.fr>",
"vaguelysalaried <b5209722-9478-4b21-b18e-d8ee0474d715@users.tedomum.net>", "vaguelysalaried <b5209722-9478-4b21-b18e-d8ee0474d715@users.tedomum.net>",
"Guillaume Winter <guillaume@winter.digital>" "Guillaume Winter <guillaume@winter.digital>",
"Cyrinux <hiboo@levis.name>",
] ]
package-mode = false
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.9" python = "^3.9"
Flask = "^2.2.3" Flask = "^3.0.1"
Flask-Login = "^0.6.2" Flask-Login = "^0.6.2"
Flask-SQLAlchemy = "^2.5.1" Flask-SQLAlchemy = "^3.1.1"
flask-babel = "^2.0.0" flask-babel = "^4.0.0"
Flask-Migrate = "^3.1.0" Flask-Migrate = "^4.0.5"
Flask-WTF = "^1.1.1" Flask-WTF = "^1.2.1"
Flask-Limiter = "^2.5.0" Flask-Limiter = "^3.5.0"
flask-redis = "^0.4.0" flask-caching = "^2.3.0"
Flask-DebugToolbar = "^0.13.1" Flask-DebugToolbar = "^0.14.1"
SQLAlchemy = "^1.4.0" SQLAlchemy = "^2.0.25"
WTForms-Components = "^0.10.5" WTForms-Components = "^0.10.5"
passlib = "^1.7.4" passlib = "^1.7.4"
PyYAML = "^6.0" PyYAML = "^6.0.1"
bcrypt = "^3.2.2" redis = "^5.2.0"
pysaml2 = "^7.4.1" bcrypt = "^4.1.2"
xmlsec = "^1.3.13" pysaml2 = "^7.5.0"
cryptography = "^37.0.4" xmlsec = "^1.3.13"
Authlib = "^1.2.0" cryptography = "^42.0.2"
terminaltables = "^3.1.10" Authlib = "^1.3.0"
Werkzeug = "^2.2.3" terminaltables = "^3.1.10"
email-validator = "^1.3.1" Werkzeug = "^3.0.1"
pyotp = "^2.8.0" email-validator = "^2.1.0.post1"
qrcode = "^7.4.2" pyotp = "^2.9.0"
jwcrypto = "^1.4.2" qrcode = "^7.4.2"
Pillow = "^9.5.0" Pillow = "^10.2.0"
joserfc = "^0.9.0"
bootstrap-flask = "^2.3.3"
mkdocs = "^1.6.1"
pymdown-extensions = "^10.14.1"
mkdocs-static-i18n = "^1.2.3"
[tool.poetry.group.dev] [tool.poetry.group.dev]
optional = true optional = true
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]
python-dotenv = "^1.0.0" python-dotenv = "^1.0.0"
pytest-playwright = "^0.4.3"
[tool.poetry.group.prod] [tool.poetry.group.prod]
optional = true optional = true
[tool.poetry.group.prod.dependencies] [tool.poetry.group.prod.dependencies]
gunicorn = "^20.1.0" gunicorn = "^20.1.0"
mysqlclient = "^2.1.1" mysqlclient = "^2.1.1"
psycopg2 = "^2.9.6" psycopg2 = "^2.9.6"
[build-system] [build-system]
requires = ["poetry-core"] requires = [ "poetry-core" ]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"
import pytest
import tempfile
import subprocess
import random
import os
import time
import requests
@pytest.fixture(scope="module")
def temp():
"""Write a temporary directory with module scope and offer
to write files in it, with optional subpath
"""
#directory = tempfile.TemporaryDirectory()
directory = tempfile.mkdtemp()
def write_and_get_filename(data, path=None):
if type(data) is str:
data = data.encode("utf8")
if path is None:
path = str(random.randbytes(3).hex())
filepath = os.path.join(directory, path)
os.makedirs(os.path.dirname(filepath), 0o755, True)
with open(filepath, "wb") as handle:
handle.write(data)
return filepath
return write_and_get_filename
@pytest.fixture(scope="module")
def app(username, password, temp):
"""Run an isolated application instance and return the URL"""
port = 5000 + random.randint(1, 999) # Port = 5XXX
url = f"http://localhost:{port}"
db = temp(b"", "hiboo.db")
env = os.environ.copy()
env.update(FLASK_APP="hiboo", SQLALCHEMY_DATABASE_URI=f"sqlite:///{db}")
subprocess.run(["flask", "db", "upgrade"], env=env)
subprocess.run(["flask", "user", "create", username, password], env=env)
subprocess.run(["flask", "user", "promote", username], env=env)
proc = subprocess.Popen(["flask", "run", "-p", str(port)], env=env)
# Wait for the server to be ready
for _ in range(30):
try:
assert requests.get(url).status_code == 200
except Exception as e:
print(e)
time.sleep(1)
else:
yield url
break
proc.terminate()
proc.wait()
@pytest.fixture(scope="session")
def username():
"""Default username for tests"""
return "admin"
@pytest.fixture(scope="session")
def password():
"""Default password for tests"""
return "admin"
@pytest.fixture
def service_name():
"""A randomly generated service name"""
return "Test service " + random.randbytes(3).hex()
from playwright import sync_api as pw
import requests
import pytest
import subprocess
import tempfile
import os
import time
HTTPD_CONFIG = """
ServerName localhost
ServerRoot /usr/lib/httpd
PidFile /tmp/apache.pid
<IfModule !unixd_module>
LoadModule unixd_module modules/mod_unixd.so
</IfModule>
<IfModule !log_config_module>
LoadModule log_config_module modules/mod_log_config.so
</IfModule>
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule env_module modules/mod_env.so
LoadModule dir_module modules/mod_dir.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_user_module modules/mod_authz_user.so
LogLevel debug
ErrorLog /dev/stderr
TransferLog /dev/stdout
Listen 127.0.0.1:8123
DocumentRoot {root}
DirectoryIndex index.html
"""
SAML_CONFIG = """
LoadModule auth_mellon_module modules/mod_auth_mellon.so
<Location />
Require valid-user
AuthType "Mellon"
MellonEnable "auth"
MellonEndpointPath "/mellon"
MellonSPPrivateKeyFile {key}
MellonSPCertFile {cert}
MellonIdPMetadataFile {metadata}
SetEnv MELLON_DISABLE_SAMESITE 1
</Location>
"""
OIDC_CONFIG = """
LoadModule auth_openidc_module modules/mod_auth_openidc.so
OIDCProviderMetadataURL {metadata}
OIDCClientID {client_id}
OIDCClientSecret {client_secret}
OIDCRedirectURI http://localhost:8123/redirect_uri
OIDCCryptoPassphrase changeme
OIDCScope "openid email profile"
<Location />
Require valid-user
AuthType "openid-connect"
</Location>
"""
@pytest.fixture
def httpd(temp):
"""Test httpd server
Multiple servers may run and will all be closed at the end, they all share
a root directory"""
proc = []
root = os.path.dirname(temp("Hello world!", "root/index.html"))
def start(config):
config_file = temp(HTTPD_CONFIG.format(root=root) + config)
proc.append(subprocess.Popen(["httpd", "-DFOREGROUND", "-f", config_file]))
time.sleep(1) # Sleep so apache can start
yield start
for pid in proc:
pid.terminate()
pid.wait()
def do_login(page, username, password):
"""Logs into hiboo"""
page.get_by_label("Username").fill(username)
page.get_by_label("Password").fill(password)
page.get_by_role("button", name="Sign in").click()
def test_login(app, context, username, password):
"""Test that logs in as default test user"""
page = context.new_page()
page.goto(app)
do_login(page, username, password)
pw.expect(page.get_by_text("Sign out")).to_be_visible()
def test_saml_auth(app, context, username, password, service_name, httpd, temp):
# First create a SAML service
page = context.new_page()
page.goto(app + "/service/create/saml")
do_login(page, username, password)
page.get_by_label("Service name").fill(service_name)
page.get_by_label("Provider").fill("test")
page.get_by_label("Description").fill("test")
page.get_by_label("Profile policy").select_option("open")
page.get_by_label("Maximum profile count").fill("10")
page.get_by_label("SP entity id").fill("http://localhost:8123/mellon/metadata")
page.get_by_label("SP ACS").fill("http://localhost:8123/mellon/postResponse")
page.get_by_role("button", name="submit").click()
# Then access the service and extract useful data
page.get_by_text(service_name).click()
httpd(SAML_CONFIG.format(
metadata=temp(requests.get(page.get_by_label("SAML Metadata").text_content()).content),
key=temp(page.get_by_label("SP private key").text_content()),
cert=temp(page.get_by_label("SP certificate").text_content())
))
# Finally log into the service provider, validate a new profile and get in
page.goto("http://localhost:8123/")
page.get_by_role("button", name="Sign up").click()
pw.expect(page.get_by_text("Hello world")).to_be_visible()
def test_oidc_auth(app, context, username, password, service_name, httpd):
# First create an OIDC service
page = context.new_page()
page.goto(app + "/service/create/oidc")
do_login(page, username, password)
page.get_by_label("Service name").fill(service_name)
page.get_by_label("Provider").fill("test")
page.get_by_label("Description").fill("test")
page.get_by_label("Profile policy").select_option("open")
page.get_by_label("Maximum profile count").fill("10")
page.get_by_label("Redirect URI").fill("http://localhost:8123/redirect_uri")
page.get_by_label("OpenID Connect grant type").select_option("authorization_code")
page.get_by_label("Allowed response types").select_option("code")
page.get_by_role("button", name="submit").click()
# Then access the service and extract useful data
page.get_by_text(service_name).click()
httpd(OIDC_CONFIG.format(
metadata=page.get_by_label("OIDC discovery endpoint").text_content(),
client_id=page.get_by_label("Client ID").text_content(),
client_secret=page.get_by_label("Client secret").text_content()
))
# Finally log into the client app, validate a new profile and get in
page.goto("http://localhost:8123/")
page.get_by_role("button", name="Sign up").click()
pw.expect(page.get_by_text("Hello world")).to_be_visible()
...@@ -10,9 +10,7 @@ module.exports = { ...@@ -10,9 +10,7 @@ module.exports = {
entry: { entry: {
app: { app: {
import: './assets/app.js', import: './assets/app.js',
dependOn: 'vendor',
}, },
vendor: './assets/vendor.js',
}, },
output: { output: {
path: path.resolve(__dirname, 'hiboo/static/'), path: path.resolve(__dirname, 'hiboo/static/'),
......