Commit graph

28 commits

Author SHA1 Message Date
Matt Baer
29c898867a
Merge pull request #483 from writefreely/log-gone-user-out
Log user out when authenticated as deleted user
2022-11-14 23:45:33 -05:00
Matt Baer
d08f067e9c Change copyright notices to Musing Studio LLC
A Bunch Tell is now Musing Studio.
2022-11-10 23:49:16 -05:00
Matt Baer
6b336e22aa Log user out when authenticated as deleted user
Now when we check for the user at certain times and find that the user
doesn't exist in the database, we log them out and send them back to
the home page.
2021-06-27 17:57:07 -04:00
Matt Baer
61974fadc0 Merge branch 'develop' into remove-nerds-dep 2021-04-19 16:18:33 -04:00
Matt Baer
484d2736ce Update repo URL to writefreely org
From the writeas org on GitHub.
2021-04-06 17:24:07 -04:00
Matt Baer
64f1d71524 Remove writeas/nerds/store dependency 2021-03-30 12:49:12 -04:00
Matt Baer
00cceca104 Update signup-via-invite page
This updates signup.tmpl to include all supported OAuth methods and respect the new `DisablePasswordAuth` config value.
2020-08-19 13:35:21 -04:00
Matt Baer
ca4a576c31 Support OAuth registration with invite code
This adds any OAuth login buttons to the invite signup page, stores the invite code for the flow duration, and associates the new user with it once successfully registered.

It enables invite-only instances with OAuth-based registration.
2020-04-20 18:18:23 -04:00
Matt Baer
6f3b502e65 Add 'X-Robots-Tag: noindex' header to invite URLs
This instructs search engines to not index invite links.
2020-02-22 19:46:36 -05:00
Matt Baer
7023b74d12 Update calls and vars for Invites and elsewhere
Ref T661
2020-02-09 11:24:48 -05:00
Matt Baer
f70c1dfaa5 Merge branch 'develop' into rename-account-suspend 2020-02-09 11:14:51 -05:00
Matt Baer
b78f64bad3 Don't fail Invite page rendering on IsUserSuspended check 2020-02-09 10:57:08 -05:00
Rob Loranger
7e014ca659
Rename Suspend status to Silence
This changes all variables and functions from using Suspend{ed} to using
Silence{d} as well as documentation, errors and logging.
2019-11-11 15:25:19 -08:00
Rob Loranger
9b69de166f
add silenced warning on invites page 2019-11-11 14:25:34 -08:00
Matt Baer
7f96e8c384 Rename UserSuspended to UserSilenced
Some of the work needed to have the backend match user-facing wording.

Ref T661
2019-11-12 00:41:25 +09:00
Matt Baer
f7550a0da8 Change more suspension check logic
From u.Status == UserSuspended to u.IsSuspended()

Ref T661
2019-11-12 00:04:36 +09:00
Rob Loranger
f85f0751a3
address PR comments
- update error messages to be correct
- move suspended message into template and include for other pages
- check suspended status on all relevant pages and show message if
logged in user is suspended.
- fix possible nil pointer error
- remove changes to db schema files
- add version comment to migration
- add UserStatus type with UserActive and UserSuspended
- change database table to use status column instead of suspended
- update toggle suspended handler to be toggle status in prep for
possible future inclusion of further user statuses
2019-10-25 12:04:24 -07:00
Matt Baer
9873fc443f Merge branch 'develop' into T661-disable-accounts 2019-10-24 13:22:26 -04:00
Matt Baer
5a9182f688 Tweak "already invited" message
Ref T690
2019-09-23 10:44:23 -04:00
Matt Baer
c6564b3d16 Shorten invite-instructions.tmpl filename 2019-09-23 10:31:38 -04:00
Matt Baer
26a4f48e8b Add expiration information to invite help
This uses the Invite fetched from the database to explain a bit more
about how the invite URL expires. It also reduces some space around the
input box.

Ref T690
2019-09-23 10:06:12 -04:00
Matt Baer
f01b439ff5 Tweak invite page title and intro
Ref T690
2019-09-23 10:02:36 -04:00
Matt Baer
7e9e3cb7eb Show status on logged-in expired invite links
Ref T690
2019-09-23 09:45:36 -04:00
Matt Baer
891b15b8a8 Always return invite errors
This ensures we see a 404 page when looking up an invalid invite URL,
even if the user is logged in.

Ref T690
2019-09-23 09:19:21 -04:00
Rob Loranger
d954b7c8e3
add user invite instructions
this adds a new page with instructions for sharing user invites

if a user clicks the link for one of their own invite codes they are
directed to a page with clear instructions for it's use.

if a user clicks another users link they are redirectec to their account
settings witha flash telling them they do not need to register.
2019-09-13 10:58:17 -07:00
Rob Loranger
77f7b4a522
Add account suspension features
This renders all requests for that user's posts, collections and related
ActivityPub endpoints with 404 responses.

While suspended, users may not create or edit posts or collections.

User status is listed in the admin user page

Admin view of user details shows status and now has a button to activate
or suspend a user.
2019-08-29 09:09:11 -07:00
Matt Baer
d8937e89a8 Make App struct public 2019-05-12 17:19:38 -04:00
Matt Baer
70e823d6ab Support user invites
This includes:

- A new `user_invites` config value that determines who can generate
  invite links
- A new page for generating invite links, with new user navigation link
- A new /invite/ path that allows anyone to sign up via unique invite
  link, even if registrations are closed
- Tracking who (of registered users) has been invited by whom

It requires an updated database with `writefreely --migrate` in order to
work.

This closes T556
2019-01-18 00:05:50 -05:00