Commit Graph

66 Commits

Author SHA1 Message Date
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 c3f76a3ab8 Change "suspend" to "silence" where user-facing
This puts the verbiage more in line with what the feature does, and
leaves room for other moderation controls in the future.

NOTE: this includes no backend refactoring, which may be confusing. We
should rename things to fit ASAP.

Ref T661
2019-11-12 00:22:33 +09:00
Matt Baer 2c2ee0c00c Tweak "suspended" notification copy 2019-11-11 15:16:04 +09:00
Matt Baer 280c32afdc Confirm suspension before submitting the form
This also includes a bit of explanation about what suspending a user
actually does.

Ref T661
2019-11-07 16:59:02 +09:00
Matt Baer c9f7219831 Move user status in list out of <a>
The link here is a little redundant, and might make people think that it
actually changes the status by clicking on it.
2019-11-07 16:49:52 +09:00
Matt Baer da7dcfee6a Move admin template IsSuspended logic into method
This adds a User.IsSuspended() method and uses it when displaying the
user's status on admin pages, instead of doing a magic number check.
This should also help in the future, in case this logic ever changes.

Ref T661
2019-11-07 14:07:00 +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 c6564b3d16 Shorten invite-instructions.tmpl filename 2019-09-23 10:31:38 -04:00
Matt Baer ddce177784 Fix invite input box size in non-Firefox browsers
font-size-adjust is still a flag-enabled feature in Chrome 77, and
doesn't have widespread support across browsers. So instead this uses
font-size to make the text large enough.

Ref T690
2019-09-23 10:21:03 -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
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
Matt Baer c7a90d2ace Fix blog post links when `chorus` enabled
This ensures the "new post" link under each blog on the user Blogs page
goes to /new instead of /.

Ref T681
2019-09-10 22:07:14 +02: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 55808233fd Fix logic for showing sign up link
This prevents the link from showing when an instance lands on the sign
up page anyway.

Ref T681
2019-08-14 23:25:02 -04:00
Matt Baer 047ad0323b Don't show user pages in nav when unauth'd
Ref T681 T680
2019-08-09 14:58:43 -04:00
Matt Baer fda2929aed Show New Post button when Chorus, not SimpleNav
Ref T681
2019-08-09 13:59:55 -04:00
Matt Baer df56060f99 Add DisableDrafts option and adjust nav
This shows Drafts in the SimpleNav menu, when both enabled. It also
hides Drafts in the non-SimpleNav menu when disabled.

Ref T679
2019-08-09 13:53:41 -04:00
Matt Baer 9dc15f569c Move About nav link next to Home
Ref T681
2019-08-09 13:52:07 -04:00
Matt Baer da423fa1bc Move Reader to Home link in nav when chorus
Also, refactor navigation bar template logic to be simpler and easier to
understand.

Ref T681
2019-08-09 13:45:19 -04:00
Matt Baer 603839fda7 Add link to Posts in user backend pages when chorus
This provides easy navigation to the logged in user's posts, since
there's no direct link to their blog otherwise.

Ref T681
2019-08-09 12:04:55 -04:00
Matt Baer f821dbaac4 Support dedicated signup page in chorus mode
This adds a Sign Up link to site navigation and shows the
otherwise-landing page on /signup when in chorus mode.

Ref T681
2019-08-09 12:00:46 -04:00
Matt Baer 7b42efb9d9 Enable customizing Reader page
This makes it possible to edit the title and introductory text at the
top of the Reader view.

Ref T684
2019-08-09 11:16:38 -04:00
Matt Baer deec914ccb Merge branch 'develop' into chorus 2019-08-08 07:55:49 -04:00
Matt Baer 1c9438e305
Merge branch 'develop' into modestly-writefreely 2019-08-07 18:02:54 -04:00
Matt Baer adfcc82241
Merge pull request #148 from writeas/default-visibility
Support setting default blog visibility on instance

Resolves T675
2019-08-07 17:44:37 -04:00
Matt Baer 1a80cd3c02 Add site-wide navigation on colls when chorus = true
This adds a new config value: `chorus` that signifies an instance is
more about the Reader view than individual blogs / writers. When
enabled, user navigation will show on all pages, including About,
Reader, and Privacy (ref T680).

It also uses different collection templates that keep the instance-wide
navigation at the top of the page, instead of the author's name --
again, branded more for the collective than the individual.

Ref T681
2019-08-07 09:00:16 -04:00
Matt Baer 17f7bc1bec Move user navigation to its own template section
Ref T681
2019-08-06 09:15:05 -04:00
Matt Baer 90ad50c7f5 Use normal nav on user pages when SimpleNav
This shows About, Reader, Log out links on backend user pages when
logged in. It also adds "New post" buttons on the backend pages and
blogs.
2019-08-05 09:34:47 -04:00
Matt Baer 73ec3e3016 Support toning down WriteFreely promotion
This adds a new `wf_modesty` config option that removes the copious
mentions of WriteFreely in places like the About page and site
footers.

WriteFreely remains boastful and bumptious by default; but enabling
the modesty option will tone it down and likely lead to less confusion
among average users.

Ref T676
2019-07-31 22:53:10 -04:00
Matt Baer 569bc792d0 Enable changing default_visibility from Admin dash
Ref T675
2019-07-31 22:20:00 -04:00
Matt Baer a48b746706 Fix empty Drafts page for single-user instances
- This removes copy mentioning the Blogs page, which isn't used on
  single-user instances
- This fixes the "Start writing" link, which on a single-user instance
  would've gone to the blog index, rather than the editor
2019-07-22 14:47:39 -04:00
Matt Baer 3129b837f1 Hide footer links to About and Privacy pages when single-user
Previously, these links showed up on user backend pages on a single-user
instance, despite them not working / only being applicable on multi-user
instances.
2019-07-22 14:40:10 -04:00
Matt Baer bd4bb52b9c Hide Public blog option on single-user instances 2019-07-22 14:37:32 -04:00
Matt Baer 7aaff778da
Merge pull request #123 from writeas/private-instance
Private instances

Resolves T576
2019-07-01 19:14:20 -04:00
Matt Baer fdcdfe4d25 Open landing page preview in new window 2019-07-01 19:05:47 -04:00
Matt Baer a72ce2ef29 Make landing page dynamic
This enables admins to customize their landing / home page via the Admin
dashboard -- including the text at the top of the page and the section
below it. It keeps the current default text, falling back to it if the
user hasn't overwritten it.

Ref T565
2019-06-27 17:06:37 -04:00
Matt Baer 35718cd239 Change blog visibility explanations on Private instance
Ref T576
2019-06-16 20:30:56 -04:00
Matt Baer 161f7a8de2 Support changing landing conf val from Admin UI
Closes T651
2019-06-16 17:38:34 -04:00
Matt Baer 63a2225b7f Add admin dashboard link to dropdown navs 2019-04-11 21:11:30 -04:00
Matt Baer af0f6302a2 Replace --reset-pass instructions with admin guide link 2019-04-11 21:10:45 -04:00
Matt Baer 9cb0f80921 Support changing instance page titles
Now admins can choose a title for their About and Privacy pages; now
editable through the instance page editor.

This adds `title` and `content_type` fields to the `appcontent` table,
requiring a migration by running `writefreely --migrate`

The content_type field specifies that items we're currently storing in
this table are all "page"s; queries for fetching these have been updated
to filter for this type. In the future, this field will be used to
indicate when an item is a stylesheet (ref T563) or other supported
type.

Ref T566
2019-04-11 13:56:07 -04:00
Matt Baer 4cad074b44 Link to version-specific writer's guide 2019-04-11 13:52:10 -04:00
Matt Baer a850fa14cd Move instance page editing to dedicated section
This adds a "Pages" section to the admin part of the site, and enables
admins to edit the pre-defined About and Privacy pages there, instead of
on the dashboard itself.

It also restructures how these pages get sent around in the backend and
lays the groundwork for dynamically adding static pages. The backend
changes were made with more customization in mind, such as an
instance-wide custom stylesheet (T563).

Ref T566
2019-04-06 13:23:22 -04:00
Matt Baer 09fb73bdd5 Standardize admin navigation 2019-04-06 11:15:14 -04:00
Matt Baer 99489aa920 Change zip link to txt on Export page
"zip" doesn't really describe what the posts themselves are exported as.
"txt" does.
2019-02-25 15:49:11 -05:00
Matt Baer d8876058a6 Add WriteFreely version to admin dash 2019-01-18 11:33:57 -05: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