Commit Graph

844 Commits

Author SHA1 Message Date
Matt Baer 0cf1d13880
Merge pull request #54 from geekgonecrazy/sqlite3-user-password
Only check for username and password if driver type is mysql
2019-01-05 21:13:32 -05:00
Matt Baer a58a756746 Use driver constants in app.go 2019-01-05 17:51:17 -05:00
Aaron Ogle 3722c6ba79
Only check for username and password if driver type is mysql 2019-01-05 14:59:05 -06:00
Matt Baer bf7d422039 Add pager to admin user list
This enables paging through the entire list of users.

Ref T553
2019-01-05 09:37:53 -05:00
Matt Baer 3d301c97e9 Fix admin user paging query 2019-01-05 08:47:42 -05:00
Matt Baer 0e722de82c Add admin user list
This enables admins on multi-user instances to see all users registered,
and view the details of each, including:

- Username
- Join date
- Total posts
- Last post date
- All blogs
  - Public info
  - Views
  - Total posts
  - Last post date
  - Fediverse followers count

This is the foundation for future user moderation features.

Ref T553
2019-01-04 22:28:29 -05:00
Matt Baer 2f4c93cccb Document package and funcs in config.go 2019-01-04 19:58:44 -05:00
Matt Baer a419bd63fc Fix make deps not fetching sqlite3 lib 2019-01-04 19:40:00 -05:00
Matt Baer fca3019e4b Support building without SQLite support
This adds a new `sqlite` build tag that you should include only if you
want SQLite3 support built in. Both `make run` and `make release` create
builds with SQLite included.
2019-01-03 17:57:06 -05:00
Matt Baer 8513def899 Send correct status on 410/500 in handleHTTPError 2019-01-03 15:43:44 -05:00
Matt Baer 19215b0355 Send correct status on 404 in handleHTTPError 2019-01-03 12:27:52 -05:00
Matt Baer 8a07c0f0a0 Extract images with .image extension 2018-12-31 16:19:26 -05:00
Matt Baer 3ae45bc156 Fix spacing around copyright notices 2018-12-31 01:05:26 -05:00
Matt Baer 256d9e3c02 Add download / docker pull counts to README 2018-12-31 00:54:45 -05:00
Matt Baer 739afd2310 Embed schema files in binary
This includes schema.sql and sqlite.sql in the release binary, so they
no longer need to be included in the release archives. This reduces the
number of files extracted, but otherwise leaves all functionality as it
was -- especially the --init-db flag.

Ref T536
2018-12-30 20:10:42 -05:00
Matt Baer d4a08723aa Add @kaiyou to AUTHORS 2018-12-24 17:33:20 -05:00
Matt Baer e525bc32a7 Use language-specific dash in post titles
This closes #1
2018-12-24 13:58:32 -05:00
Matt Baer 69eab50f42 Create darwin archives with macos in the name
(not "darwin")
2018-12-24 12:56:57 -05:00
Matt Baer 1274914207 Add copyright / license notices to .go files 2018-12-24 12:45:15 -05:00
Matt Baer 7f5551105a Fix metadata update redirect on single-user instances
Fixes #50
2018-12-24 10:33:40 -05:00
Matt Baer 1439c8c359 Add --create-user option for regular user
This supports creating a regular user via the command-line.
2018-12-22 10:54:08 -05:00
Matt Baer 5e5b283daf Validate username in admin user creation process
This runs usernames through the same checks as the web interface,
ensuring no invalid user is created, such as user_name or userName.

This closes #49
2018-12-19 21:26:13 -05:00
Matt Baer 852ca5eea4 Merge branch 'master' of github.com:writeas/writefreely 2018-12-18 08:29:24 -05:00
Matt Baer 88e1c65939
Merge pull request #48 from TeDomum/master
Fix the Docker build when installing go-sqlite
2018-12-18 08:29:08 -05:00
Matt Baer f99244b93f Factor out admin user creation logic 2018-12-17 18:13:26 -05:00
Matt Baer 13bf5b6638 Include max number of blogs in nodeinfo 2018-12-17 01:27:04 -05:00
kaiyou 38184f4d13 Fix the Docker build when installing go-sqlite
Go-SQLite requires sqlite library headers and gcc.
2018-12-16 20:49:27 +01:00
Matt Baer 11de25237d Fix db.Ping() call 2018-12-15 14:14:09 -05:00
Matt Baer dad79adfd2 Update features list
And Quick Start intro
2018-12-14 22:43:32 -05:00
Matt Baer 2178b4abf2 Check database connection on startup 2018-12-13 19:15:09 -05:00
Matt Baer 3fab9f6439 Add missing CSS for highlightjs 2018-12-10 16:22:11 -05:00
Matt Baer 8beccaf6c2 Reserve "community" username 2018-12-10 16:18:09 -05:00
Matt Baer 4b8d5e3e37 Bump version to 0.6.0 2018-12-10 16:17:57 -05:00
Matt Baer 25a68d0c0e Add Reader section
This adds a "Reader" section of the site for admins who want to enable
it for their instance. That means visitors can go to /read and see who
has publicly shared their writing. They can also follow all public posts
via RSS by going to /read/feed/. Writers on an instance with this
`local_timeline` setting enabled can publish to the timeline by going
into their blog settings and choosing the "Public" visibility setting.

The `local_timeline` feature is disabled by default, as is the Public
setting on writer blogs. Enabling it adds a "Reader" navigation item and
enables the reader endpoints. This feature will also consume more
memory, as public posts are cached in memory for 10 minutes.

These changes include code ported over from Read.Write.as, and thus
include some experimental features like filtering public posts by tags
and authors. These features aren't well-tested or complete.

Closes T554
2018-12-10 16:08:07 -05:00
Matt Baer 7828bf6ba2 Merge branch 'develop' 2018-12-10 14:22:53 -05:00
Matt Baer 2422601e89
Merge pull request #45 from writeas/sqlite-support
SQLite support
2018-12-10 14:22:27 -05:00
Matt Baer d3b120be75 Merge branch 'sqlite-support' into develop 2018-12-10 00:27: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
Matt Baer 9fb7777c33 Switch to xgo for cross-compilation
Ref T529
2018-12-08 18:27:50 -05:00
Matt Baer 111945bc5d Add new -c [filename] option for supplying config file
This allows users to load a different configuration file instead of the
default config.ini. It works in combination with other configuration
actions, like --config and --create-config.
2018-12-08 17:49:19 -05:00
Matt Baer 20c77989ba Update setup steps 2018-12-08 15:26:33 -05:00
Matt Baer 17c816477b Add SQLite option to config process
Ref T529
2018-12-08 13:36:51 -05:00
Matt Baer ba3d6ae64c Support custom SQLite database file name
Ref T529
2018-12-08 13:34:29 -05:00
Matt Baer c6851fee50 Fix duplicate key checks in SQLite
Ref T529
2018-12-08 13:25:20 -05:00
Matt Baer 4b780361bf Fix upsert queries on SQLite
Ref T529
2018-12-08 12:58:45 -05:00
Matt Baer 026604b3dd Fix pinned post content truncation with SQLite
This extracts the LEFT/SUBSTR logic into its own datastore.clip() method
that also works correctly with SQLite.

Ref T529
2018-12-08 12:54:49 -05:00
Matt Baer daaa4564bb Fix post `created` date in SQLite
We store times in UTC in all other places, but the post.Created logic
when creating a post meant that dates were being stored in a user's
local timezone. This fixes that.

Ref T529
2018-12-08 12:51:27 -05:00
Matt Baer 6f4c004e8c Fix SQLite date format string
The formatted string was invalid before, causing date parsing to fail.
This fixes that.

Ref T529
2018-12-08 12:28:52 -05:00
Matt Baer bc1b3fdfb7 Move NOW() calls to datastore.now() method
Ref T529
2018-12-08 12:15:16 -05:00
Matt Baer 7fab11b3c8 Move initial config loading to its own func 2018-12-08 10:39:25 -05:00