176 Commits

Author SHA1 Message Date
Harvey Tindall
49b056f1d6 fix notification buttons
their current status wouldn't display because of a slight mistake, and
they did the wrong thing because i forgot there isn't a nil value for
bools.
2020-09-19 17:05:09 +01:00
Harvey Tindall
5ba40cd6f8 fix panic when jfa-go user has no email set with jellyfin_login 2020-09-19 09:09:30 +01:00
Harvey Tindall
d4b94bc9d9 add user button
added create user button for the admin to use.
2020-09-18 00:59:59 +01:00
Harvey Tindall
9213f2a078 Add account deletion with email notification
Select users to delete, then optionally opt to notify the user in an
email with a provided reason.
2020-09-17 23:50:07 +01:00
Harvey Tindall
7ac750879f Remove email addresses in settings, move to accounts tab
still a little rough, but it works.
2020-09-17 21:23:45 +01:00
Harvey Tindall
cd61989495 Initial features of accounts tab
It's rough right now, but the accounts tab shows a list of users and
info. Right now the only action available is to apply settings (from
template or another user) to a selection of users. More to come.
2020-09-17 16:51:19 +01:00
Harvey Tindall
a8b4842895 add more info to getUsers, move admin.html css to scss files
more deatils included in getUsers response in prep for feature request #5. bs4 and bs5 css are now compiled instead of being copied.
2020-09-16 21:42:22 +01:00
Harvey Tindall
b8dfb5d6a3 decouple email content from sender to ensure thread safety
If two emails fired off at once, they would previously replace each
other's content and possibly send the wrong email to the wrong person.
construct* methods now return the email content, which is sent
separately.
2020-09-13 21:18:47 +01:00
Harvey Tindall
51839b5942 Restructure email sending
smtp and mailgun now implement an emailClient interface, which the
Emailer can use.
2020-09-13 21:07:15 +01:00
Harvey Tindall
bbb0568cc4 basic daemon functionality, self-restarts without syscall.exec
running 'jfa-go start' will run it as a daemon in the background, and
'jfa-go stop' will tell it to quit via a unix socket. Self-restarts are
now implented by simply exiting the main function (now called start) and
running it again.
2020-09-08 23:08:50 +01:00
Harvey Tindall
ba67fa7536 Initial Ombi integration
When enabled, an account for the user is created on both Jellyfin and
Ombi. Account defaults can be stored similarly to jf.
2020-09-05 17:32:49 +01:00
Harvey Tindall
0e39b2b699 remove debug fmt.Printlns 2020-08-20 20:35:50 +01:00
Harvey Tindall
ee3b421566 Fixed flaw with jellyfin_login; store refresh token in cookies
with jellyfin_login enabled, the username and password vals in the User
struct would be "". If you disabled 'required' on the login form, blank
username and password would allow you in.
2020-08-20 20:20:31 +01:00
Harvey Tindall
d144077e62 Add refresh tokens for persistent login, logout button
the main JWT is stored temporarily, whereas the refresh token is stored
as a cookie and can only be used to obtain a new main token. Logout
button adds token to blocklist internally and deletes JWT and refresh
token from browser storage.
2020-08-19 22:30:54 +01:00
Harvey Tindall
fd766e7b1a use app identifier instead of ctx
changing this because ctx is commonly used with the context package.
2020-08-16 13:36:54 +01:00
Harvey Tindall
39bf3ad7f1 Safe shutdown 2020-08-05 16:58:24 +01:00
Harvey Tindall
23dbcf33ae reinitialize validator on settings change 2020-08-03 00:12:45 +01:00
Harvey Tindall
f0be006e16 use goroutines for (most) emails
invite emails have been left alone so that email success message is
shown on web ui
2020-08-02 17:17:29 +01:00
Harvey Tindall
f508b65fa0 Added setup, self restarts 2020-08-02 00:05:35 +01:00
Harvey Tindall
4e16f6fd48 make checkInvite check only one invite, invite daemon
checkInvite no longer loops over all invites and checks for expiry, that
functionality has moved to checkInvites. Couple more rogue print
statements removed aswell.
2020-08-01 15:22:30 +01:00
Harvey Tindall
99a643ce9c Finished logging api 2020-08-01 12:35:28 +01:00
Harvey Tindall
326b274329 Settings functional, start adding logging
Modifying settings also formats it nicely, as a bonus.
Also we using shortuuid instead of normal uuidv4 now because its the same
length as what I used in the python version.
2020-07-31 22:07:09 +01:00
Harvey Tindall
024c0b56aa Display settings with hacky solution to retain order
Python utility included to convert config-base.json into a new version
which includes lists that define the order settings should be displayed.
admin.js edited to recognize this.
2020-07-31 16:09:30 +01:00
Harvey Tindall
ef4f2503c9 DeleteInvite, user defaults, and email list modification 2020-07-31 13:59:25 +01:00
Harvey Tindall
961b9afa75 Functioning user creation, notifications,
Fixed password validation for new users, add invite route, couple other
fixes.
2020-07-31 12:48:37 +01:00
Harvey Tindall
d8fb6e5613 first 2020-07-29 22:11:28 +01:00