Fixed local MastoFE authentication / force_login option.

This commit is contained in:
Ivan Tashkinov 2019-04-01 17:25:25 +03:00
commit 6910fb371b
3 changed files with 13 additions and 5 deletions

View file

@ -7,7 +7,7 @@ defmodule Pleroma.Web.ControllerHelper do
# As in MastoAPI, per https://api.rubyonrails.org/classes/ActiveModel/Type/Boolean.html
@falsy_param_values [false, 0, "0", "f", "F", "false", "FALSE", "off", "OFF"]
def truthy_param?(nil), do: nil
def truthy_param?(blank_value) when blank_value in [nil, ""], do: nil
def truthy_param?(value), do: value not in @falsy_param_values
def oauth_scopes(params, default) do