Commit Graph

11 Commits

Author SHA1 Message Date
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
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 3a6118c207 Set up migrations table on initial setup
This includes the appmigrations table in the schema files, and inserts
the current database version when running writefreely --init-db
2019-01-24 17:08:08 -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
Matt Baer a3e287a77a Make accesstokens.user_agent NULL by default
The field is currently unused in the app, and it was causing problems in
SQLite.

Ref T529
2018-12-10 00:26:54 -05:00
Ben Overmyer 6cb86214d7 SQLite support added. 2018-12-01 12:07:25 -06:00
Matt Baer bdc4f270f8 Support editing About and Privacy pages from Admin panel
This allows admin to edit these pages from the web, using Markdown. It
also dynamically loads information on those pages now, and makes loading
`pages` templates a little easier to find in the code / more explicit.

It requires this new schema change:

CREATE TABLE IF NOT EXISTS `appcontent` (
  `id` varchar(36) NOT NULL,
  `content` mediumtext CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

This closes T533
2018-11-18 21:58:50 -05:00
Matt Baer 6220e55559 Provide default `updated` value
This addresses #18
2018-11-13 08:52:42 -05:00
Matt Baer bbed72ff6b Remove unneeded followers column from remoteusers
To migrate:

  ALTER TABLE `remoteusers` DROP `followers`;
2018-11-11 12:43:24 -05:00
Matt Baer 3bf10d8074 Remove default value for `posts`.`updated`
This closes #3
2018-11-10 00:28:19 -05:00
Matt Baer 18b9b2124e Add database schema 2018-11-07 22:17:15 -05:00