Commit Graph

60 Commits

Author SHA1 Message Date
Matt Baer a773d94dc7 Reorder Gitea fields and structs in config.go 2020-08-19 13:26:15 -04:00
Pascal Richier d3f1e40010
Merge branch 'develop' into feature/generic-oauth 2020-08-16 19:58:01 +02:00
Matt Baer b2382b5422
Merge pull request #293 from gytisrepecka/oauth-gitea
Added Gitea OAuth login and account management.
2020-08-13 10:41:29 -04:00
Matt Baer 6dbc753ecb Merge branch 'develop' into gopher 2020-07-23 11:47:49 -04:00
prichier f6aa99e591 Add disable_password_auth option 2020-06-14 00:27:25 +02:00
prichier 724ab34006 Fix: option name from allow_logout to allow_disconnect 2020-06-06 23:52:26 +02:00
prichier fe7ff38bd8 Manage generic Oauth buttons on Account Settings
Add generic Oauth allow_logout option
2020-05-31 04:09:14 +02:00
Keturah Dola-Borg 89f7946cb0 Add config/ini structures for generic oauth
Signed-off-by: prichier <pascoualito@gmail.com>
2020-05-30 23:58:51 +02:00
Joice M. Joseph 671c7e99a5 fix: #297 - tls for mysql connetions 2020-04-16 09:34:16 +05:30
gytisrepecka c798a44f69
Added Gitea OAuth login and account management. 2020-04-03 13:26:59 +03:00
Matt Baer c3400242f0
Merge pull request #274 from writeas/private-instance-improvements
Private instance cleanup
2020-03-27 09:05:45 -04:00
Kyle Robbertze 26b6ed5f4f simplify gitlab oauth config 2020-03-16 15:11:03 +02:00
Kyle Robbertze c292512b9d add Gitlab OAuth 2020-03-12 10:50:55 +02:00
Matt Baer 2db6c33a41 Consolidate /signup page link logic
This moves logic for determining whether or not to show a "Sign up" page
on /signup (i.e. because the `/` route shows another, non-signup page)
into the AppCfg.SignupPath() method. It also changes various signup
links to use this value.
2020-03-02 16:34:44 -06:00
Matt Baer 6aa8de3a4b Add Gopher support
This adds gopher support to WriteFreely -- both single- and multi-user
instances. It is off by default, but can be enabled with the new
`gopher_port` config value in the `[server]` section.

When enabled, multi-user instances will show all public blogs at
gopher://[host]:[gopher_port]/ -- otherwise, blogs are accessible at
gopher://[host]:[gopher_port]/[blog]/

This is just a proof of concept for now. We still need to handle some
edge cases and different configurations, like private instances.

Ref T559
2020-03-01 20:12:47 -05:00
Matt Baer 84ab41697b Merge branch 'develop' into admin-dashboard-redesign 2020-02-14 14:50:23 -05:00
Matt Baer 8364dce398 Merge branch 'develop' into T572-check-updates 2020-02-14 14:27:22 -05:00
Matt Baer b58464addb Optionally hide Monitor page in Admin nav
This adds a new config option that signifies the admin doesn't need to
see deeply technical things, like application resource usage. In the
[app] section, set forest = true to enable this.

Ref T694
2020-02-14 14:12:28 -05:00
Nick Gerakines 5e76565271 Code cleanup per PR feedback. T712 2020-01-07 21:52:55 -05:00
Nick Gerakines 28cf4dd5f5 Added state location register hook. T712. 2020-01-07 15:22:25 -05:00
Nick Gerakines 6429d495a2 Implemented /oauth/signup. T712 2020-01-03 13:50:21 -05:00
Nick Gerakines 462f87919a Feature complete on MVP slack auth integration. T710 2019-12-28 15:15:47 -05:00
Nick Gerakines 13121cb266 Merging T705-oauth into T710-oauth-slack. T705,T710 2019-12-27 13:40:11 -05:00
Nick Gerakines 7a0863f71b Added oauth handlers and tests with mocks. Part of T705. 2019-12-19 11:51:19 -05:00
Matt Baer 38f3eec8e0 Merge branch 'develop' into T572-check-updates 2019-11-11 15:45:47 +09:00
Rob Loranger eae4097677
add update checks
includes cache of latest version and page to view if updates are
available with a link to the latest update's release notes and a link to
check for the latest update now, refreshing the cache manually.
2019-08-29 15:30:27 -07: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 deec914ccb Merge branch 'develop' into chorus 2019-08-08 07:55:49 -04:00
Matt Baer 8557119451
Merge pull request #153 from writeas/configurable-editor
Add editor config option
2019-08-08 07:33:04 -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 81847fbbcc Land on Blogs page when SimpleNav is enabled
This shows the Blogs page instead of the Editor to logged in users on
the `/` path when the new `simple_nav` config option is enabled.

Ref T680
2019-08-05 09:27:51 -04:00
Matt Baer f6a7dfacb9 Add editor config option
Ref T677
2019-08-04 22:20:30 -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 a75b45f060 Support configuring default collection visibility
This adds a new `default_visibility` config value that lets an instance
admin set the visibility of newly created collections.

Ref T675
2019-07-31 22:18:40 -04:00
Matt Baer 36fb7ecb2b Support automatically generated certificates
This adds a new config option in the `[server]` section: `autocert`.
When true, WF will automatically generate certificates instead of using
ones from the provided cert path. However, all generated certificates
will be stored in the configured `tls_cert_path`.

Ref T542
2019-07-20 20:49:20 -04:00
Matt Baer b3a36a3be7 Allow completely private instances, part 1
This is the start of all changes needed to support entirely private
instances, where all blogs are only visible to other authenticated users
on an instance (ref T576). It begins by changing how Handler methods check an
endpoint's permissions.

- Renames UserLevelLEVEL consts to UserLevelLEVELType
- Adds UserLevelLEVEL funcs with same names as previous consts. Each
  returns a UserLevel
- Adds a new UserLevelReader that restricts access based on app
  configuration. This is now used on collections and posts.
- Changes routing a bit so static files are always accessible
2019-06-16 18:55:50 -04:00
Matt Baer 584fe4fb93 Support changing default landing path
This adds a new `landing` value in the [app] section of config.ini.
If non-empty, unauthenticated users on multi-user instances will be
redirected to the path given there.

This closes T574
2019-06-13 13:47:27 -04:00
Matt Baer 6c7ee76768 Support configuring resource directories
This adds new configuration values that specify the parent directory of
application resources:

- templates_parent_dir
- static_parent_dir
- pages_parent_dir
- keys_parent_dir

For any values not specified, the application will default to the
current directory.

This closes T560
2019-01-18 18:57:04 -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 2f4c93cccb Document package and funcs in config.go 2019-01-04 19:58:44 -05:00
Matt Baer 3ae45bc156 Fix spacing around copyright notices 2018-12-31 01:05:26 -05:00
Matt Baer 1274914207 Add copyright / license notices to .go files 2018-12-24 12:45:15 -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 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 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 cbf6ff54df Add site_description config value
This changes what displays in the NodeInfo, and in the future might be
used for other things.
2018-12-03 18:36:33 -05:00
Marcel van der Boom 543f6c9ae3 Allow 'bind' in config to specify bind address
Minimal changes, definitely WIP, to resolve:

- how to support dualstack when not using localhost?
- net/http package uses string, mentions IP address instead of bind,
  need info.
2018-11-26 16:50:36 +01:00