Skip to content

Refactoring of :if_func / :unless_func plug options

Ivan Tashkinov requested to merge plug-if-unless-func-options-refactoring into develop

Refactoring of :if_func / :unless_func plug options:

  • Now available to all plugs having use Pleroma.Web, :plug — keeping Pleroma.Plugs.EnsureAuthenticatedPlug-specific doesn't make sense (also, previously EnsureAuthenticatedPlug was added to called plugs list before the above options were processed, so the plug might be actually bypassed because of these options but still be present in called plugs list; this MR fixes that).

  • Changed arity from 0 to 1 (Plug.Conn record is being passed as an argument).

Added tests for Pleroma.Web.Plug.

Merge request reports