Commit Graph

61 Commits

Author SHA1 Message Date
Harvey Tindall 762d5325fb
matrix: E2EE as build option
since this is so broken and requires CGO deps, E2EE support is now only
included with "make E2EE=on ...". The option to enable will then appear
in settings.
2021-07-16 15:44:14 +01:00
Harvey Tindall 833d02b032
matrix: end-to-end encryption by default
Existing chats will remain unencrypted but new ones will be.
2021-07-13 19:02:16 +01:00
Harvey Tindall 3e55cd1e31
accounts: add templates for announcements
you can now save announcements as templates, and then use them later by
hovering over the "Announce" button, as well as delete them.
2021-07-10 16:43:27 +01:00
Harvey Tindall b682685a3b
update weblate link 2021-06-30 18:06:31 +01:00
Harvey Tindall 0a71d5b216
PWR: Add option to set new password from magic link
For #103. Enable in Settings > Password Resets. Also changes the user's
ombi password.
2021-06-07 13:49:05 +01:00
Harvey Tindall e7cb1f516b
Mention wiki in Telegram/Discord/Matrix settings descriptions 2021-05-31 20:32:16 +01:00
Harvey Tindall 75fdf6ec3d
Matrix: Connect on accounts tab, customizable chat topic 2021-05-30 11:47:41 +01:00
Harvey Tindall e97b90d4d7
Matrix: Setup bot, add PIN verification
PIN is verified but not used currently. Works a little different than
the others, you input your matrix user ID and then the PIN is sent to
you. The bot doesn't support E2EE, so the bot being the first one to
message ensures the chat is unencrypted.
2021-05-29 17:43:11 +01:00
Harvey Tindall 1f9af8df89
Discord: Add option to provide server invite
When enabled, a temporary one-use invite is created and shown to the
user on the account creation form.
2021-05-23 19:50:03 +01:00
Harvey Tindall f8f5f35cc1
PIN verification, notifications, multiple notif providers
Discord, Email & Telegram can be enabled, although email is always
enabled right now (will fix). Also apparently markdown hyperlinks don't
work in Discord, eventually will implement something to convert them to
embeds.
2021-05-21 21:35:25 +01:00
Harvey Tindall d928df7ab2
Discord: Start bot, add !start and pin validity check
The bot should be created by the admin and added to a discord server
mutual to the intended new user(s). On !start in the server,
communication is moved to DMs. Currently !start works, and validity of a
given PIN is checked although nothing it done with this yet.
2021-05-17 23:42:33 +01:00
Harvey Tindall 901ad7529e
mention wiki in telegram settings description 2021-05-07 23:36:46 +01:00
Harvey Tindall ea0293bd4e
Split some settings into new "messages" section
Most email dependant sections now depend on this. Also renamed more
email things.
2021-05-07 21:53:29 +01:00
Harvey Tindall 99875b9176
almost complete telegram user verification
When signing up, the user is given a pin code which they send to a
telegram bot. This provides user verification, but more importantly
allows the bot to message the user, as the Telegram API requires the
user to interact with the bot before it can do the opposite.

The bot should recognize the correct language, but a /lang command is
also provided to change it.

The verification process is pretty much functional but ui is still
broken, and it isn't properly integrated yet.
2021-05-07 01:08:12 +01:00
Harvey Tindall af61549bf1
ombi: reset password when using pwr links
When password reset links are enabled, the ombi password will be reset
to the PIN along with Jellyfin.
2021-05-02 13:23:59 +01:00
Harvey Tindall 55e21f8be3
accounts: add user enable/disable & emails 2021-04-12 21:28:36 +01:00
Harvey Tindall d701c5f27d
add months field to invites & expiry 2021-04-08 20:43:01 +01:00
Harvey Tindall 9370913ace
add password reset link option
When enabled (in Settings > Password Resets), a magic link will be sent
instead of a PIN when the user tries reset their password. By doing
this the user doesn't have to keep the Jellyfin tab open to enter the
code.
2021-03-30 22:41:28 +01:00
Harvey Tindall 111533fa2d
add advanced setting type with toggle in settings 2021-03-15 22:51:17 +00:00
Harvey Tindall 43e5bbbe21
add option to trust specific cert for SMTP 2021-03-15 21:57:42 +00:00
Harvey Tindall 92332206f0
add basic update functionality
If enabled, jfa-go pings buildrone (hosted at builds.hrfee.pw) every 30
min for new updates. If there is one, it gets information (and if
applicable, a binary) from the appropriate source (buildrone, github, or
dockerhub) and displays it on the admin page. You can switch update
channels between stable and unstable. For binary releases, updates are
downloaded automatically and installed when the user presses update.

Since this obviously introduces some "phone-home" functionality into
jfa-go, I just want to say IPs are not and will not be logged by
buildrone, although I may later introduce functionality to give a rough
idea of the number of users (again, no IPs stored). The whole thing can
also be turned off in settings.
2021-03-07 15:23:44 +00:00
Harvey Tindall 1e9d184508
implement user expiry functionality
All works now, but i'll add a field on the accounts tab for users with
an expiry, as well as a 'disabled' badge.
2021-02-28 15:41:06 +00:00
Harvey Tindall eb406ef951
Implement email template generation
Variables are surrounded by {}, and initial (default) templates are
generated on demand from the plaintext version of emails. The custom
emails are intended to only be used if the user actually changes them,
as they lose the features of the default ones, such as tables.
2021-02-19 21:38:20 +00:00
Harvey Tindall 93b5b483cc
add plaintext email option, use text/template
text/template is used on plaintext emails to avoid escaping of certain
characters.
2021-02-18 18:26:23 +00:00
Harvey Tindall 403ad58274
move all scripts to scripts/ 2021-02-17 14:32:03 +00:00
Harvey Tindall f794322392
Merge branch 'go1.16'
merge go1.16 changes

This includes embedded files for releases (no extra 'data' directory!)
and support for a custom language file directory, allowing one to
customize the text accross the app.
2021-02-17 11:15:21 +00:00
Harvey Tindall ba7370171a
lowercase lang, go mod tidy 2021-02-16 14:31:31 +00:00
Harvey Tindall e6775cd2d1
use embed.fs wrapper for langFS so lang/ is not needed in paths
[files]lang_files is now the path to the lang directory, not path to a
directory containing it.
2021-02-12 14:35:16 +00:00
Harvey Tindall 815bdc35ac
fully self-contained
paths are pretty janky, but it works. Also, [files]/lang_files now must
be the path to a directory CONTAINING a "lang/" directory. I'll work
around this at a later date.
2021-02-12 14:28:09 +00:00
Harvey Tindall 0330540f87
Use fs for language, add lang_files option
The local app translations are loaded, and then if [files]/lang_files
is provided (a directory containing custom translations), any found
inside it are loaded over top. This makes customizing much easier.
2021-02-12 14:28:09 +00:00
Harvey Tindall fefe2d82a4
rebase 12/02, use go1.16rc1 in make, remove ioutil, start switching to io/fs for file i/o
ioutil's contents are now in io and os.
Eventually jfa-go's files will be embedded in the binary with go1.16's
new embed feature. Using io/fs will provide abstraction for accessing
these files, and allow for both embedded and non-embedded versions.
Also, internal paths to things like email templates, etc. will be
prefixed with "jfa-go:" to indicate to use the app's own Filesystem
instead of reading the file normally. This also allows for custom files
to continue to be used as they are currently.
2021-02-12 14:27:01 +00:00
Harvey Tindall 456ef556b1
add inter-section dependency for settings
Currently used to hide all email sections when [email]/method is blank
(disabled).
2021-01-31 18:50:04 +00:00
Harvey Tindall ee026714d4
Add optional email confirmation
If enabled, a confirmation email will be sent before the user can create
their account.
2021-01-30 19:19:12 +00:00
Harvey Tindall bf1e6230dc
split some strings into common file; use lang file to setup page 2021-01-25 21:26:54 +00:00
Harvey Tindall ea262ca60b
add optional welcome email for new users
When enabled, an email with the server URL and username will be sent to
created users. Requested in #38.
2021-01-24 15:19:58 +00:00
Harvey Tindall 26a1f30d32
Fix initial language setting value
For some reason it was set as en-US, not en-us.
2021-01-18 00:14:12 +00:00
Harvey Tindall ffc62574ec
Fix server push and use Link header to load CSS
Nginx with http2_push_preload on will convert the Link header to server
pushes, so we use it to load css.
2021-01-15 18:57:12 +00:00
Harvey Tindall 772e12d11c
add optional tls/http2 support
Allows for http2 server push, see the advanced section.
2021-01-15 14:43:32 +00:00
Harvey Tindall bc99dc34ee
Add email translation, add part of french translations
Admin translation from @Killianbe, Email translation from
@Cornichon420. French is currently not functional, a few things are
missing which i'm waiting on.
2021-01-15 14:43:32 +00:00
Harvey Tindall a3351f4da8
separate options for form and admin language 2021-01-15 14:43:32 +00:00
Harvey Tindall 3fbbc7f620
add language selector to form 2021-01-11 19:17:43 +00:00
Harvey Tindall e532000ad0 Mention emby in README, add notices about password resets 2021-01-10 16:10:03 +00:00
Harvey Tindall 8d0dc232d7 option to substitute "Jellyfin" in form.html
setting is jellyfin/substitute_jellyfin_strings.
2021-01-10 16:10:03 +00:00
Harvey Tindall f5602f1e96 change settings description and console warning 2021-01-10 16:10:03 +00:00
Harvey Tindall d9e1e2f58b compiles, basic issues fixed
Server type is found under the Jellyfin settings tab, where you can
change it to emby. Currently:

* logs in
* creates users
* parses accounts
2021-01-10 16:10:03 +00:00
Harvey Tindall eb370d64df
Merge a17t-redesign, kinda ts-ify setup.js
the web ui has been redesigned with the a17t toolkit, which imo looks a
lot better than bootstrap. This also brought a complete rework of the
web code, which now makes a lot more sense hopefully. the setup page is
still stuck with bootstrap, its not much of a priority but i'll rewrite
it eventually.
2021-01-05 18:16:23 +00:00
Harvey Tindall 9dbf60e3df
add URL base option for subfolder proxies
also cleaned up the naming of some things.
2020-11-22 16:36:43 +00:00
Harvey Tindall d64e98da37
use Bearer auth instead of Basic
this was a relic from the python version, i'd modeled the auth code off
some random blog post back then.
2020-11-12 21:05:46 +00:00
Harvey Tindall 8e45ecb214
add cache_timeout option
controls how old the Jellyfin user cache can be before refetching. defaults to 30 minutes.
2020-11-02 23:26:46 +00:00
Harvey Tindall d64d5c194f
initial steps for localisation 2020-10-30 22:51:47 +00:00