From bd768088c2a86fb88d9c2e2ece75edd07936f0f6 Mon Sep 17 00:00:00 2001 From: Luna D Date: Tue, 3 Mar 2020 14:29:14 -0500 Subject: [PATCH] static pages permission --- lib/philomena_web/views/admin/user_view.ex | 4 +++- priv/repo/seeds.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/philomena_web/views/admin/user_view.ex b/lib/philomena_web/views/admin/user_view.ex index b655fa37..e2bdcbe8 100644 --- a/lib/philomena_web/views/admin/user_view.ex +++ b/lib/philomena_web/views/admin/user_view.ex @@ -40,6 +40,7 @@ defmodule PhilomenaWeb.Admin.UserView do def description("admin", "SiteNotice"), do: "Manage site notices" def description("admin", "Badge"), do: "Manage badges" def description("admin", "Advert"), do: "Manage ads" + def description("admin", "StaticPage"), do: "Manage static pages" def description(_name, _resource_type), do: "(unknown permission)" @@ -73,7 +74,8 @@ defmodule PhilomenaWeb.Admin.UserView do ["admin", "Role"], ["admin", "SiteNotice"], ["admin", "Badge"], - ["admin", "Advert"] + ["admin", "Advert"], + ["admin", "StaticPage"] ] end end diff --git a/priv/repo/seeds.json b/priv/repo/seeds.json index 6c4bf774..a0bcdfd6 100644 --- a/priv/repo/seeds.json +++ b/priv/repo/seeds.json @@ -89,6 +89,7 @@ {"name": "admin", "resource_type": "Role"}, {"name": "batch_update", "resource_type": "Tag"}, {"name": "moderator", "resource_type": "Topic"}, - {"name": "admin", "resource_type": "Advert"} + {"name": "admin", "resource_type": "Advert"}, + {"name": "admin", "resource_type": "StaticPage"} ] }