logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: c0e4b1b3e27a4a8f8f02ea6a33b76c6f2a386d95
parent 0d697bc15a535eed17f017b9a18d60b2e4cef34e
Author: Ilja <ilja@ilja.space>
Date:   Sat,  2 Jul 2022 07:52:39 +0200

Fix typo's

priviledge |-> privilege

Diffstat:

Mconfig/description.exs4++--
Mdocs/installation/migrating_from_source_otp_en.md2+-
Mdocs/installation/otp_en.md2+-
Mlib/pleroma/web/plugs/ensure_privileged_plug.ex6+++---
Mtest/pleroma/web/plugs/ensure_privileged_plug_test.exs6+++---
5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/config/description.exs b/config/description.exs @@ -976,7 +976,7 @@ config :pleroma, :config_description, [ :emoji_manage_emoji ], description: - "What extra priviledges to allow admins (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)" + "What extra privileges to allow admins (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)" }, %{ key: :moderator_privileges, @@ -994,7 +994,7 @@ config :pleroma, :config_description, [ :emoji_manage_emoji ], description: - "What extra priviledges to allow moderators (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)" + "What extra privileges to allow moderators (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)" }, %{ key: :birthday_required, diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md @@ -5,7 +5,7 @@ In this guide we cover how you can migrate from a from source installation to one using OTP releases. ## Pre-requisites -You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`. +You will be running commands as root. If you aren't root already, please elevate your privileges by executing `sudo su`/`su`. The system needs to have `curl` and `unzip` installed for downloading and unpacking release builds. diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md @@ -8,7 +8,7 @@ This guide covers a installation using an OTP release. To install Pleroma from s * A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below * A (sub)domain pointed to the machine -You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`. +You will be running commands as root. If you aren't root already, please elevate your privileges by executing `sudo su`/`su`. While in theory OTP releases are possbile to install on any compatible machine, for the sake of simplicity this guide focuses only on Debian/Ubuntu and Alpine. diff --git a/lib/pleroma/web/plugs/ensure_privileged_plug.ex b/lib/pleroma/web/plugs/ensure_privileged_plug.ex @@ -24,10 +24,10 @@ defmodule Pleroma.Web.Plugs.EnsurePrivilegedPlug do def call( %{assigns: %{user: %User{is_admin: is_admin, is_moderator: is_moderator}}} = conn, - priviledge + privilege ) do - if (is_admin and priviledge in Config.get([:instance, :admin_privileges])) or - (is_moderator and priviledge in Config.get([:instance, :moderator_privileges])) do + if (is_admin and privilege in Config.get([:instance, :admin_privileges])) or + (is_moderator and privilege in Config.get([:instance, :moderator_privileges])) do conn else conn diff --git a/test/pleroma/web/plugs/ensure_privileged_plug_test.exs b/test/pleroma/web/plugs/ensure_privileged_plug_test.exs @@ -64,7 +64,7 @@ defmodule Pleroma.Web.Plugs.EnsurePrivilegedPlugTest do assert conn.status == 403 end - test "accepts for a priviledged role even if other role isn't priviledged" do + test "accepts for a privileged role even if other role isn't privileged" do clear_config([:instance, :admin_privileges], [:cofe]) clear_config([:instance, :moderator_privileges], []) user = insert(:user, is_admin: true, is_moderator: true) @@ -72,7 +72,7 @@ defmodule Pleroma.Web.Plugs.EnsurePrivilegedPlugTest do ret_conn = EnsurePrivilegedPlug.call(conn, :cofe) - # priviledged through admin role + # privileged through admin role assert conn == ret_conn clear_config([:instance, :admin_privileges], []) @@ -82,7 +82,7 @@ defmodule Pleroma.Web.Plugs.EnsurePrivilegedPlugTest do ret_conn = EnsurePrivilegedPlug.call(conn, :cofe) - # priviledged through moderator role + # privileged through moderator role assert conn == ret_conn end