Skip to content
Snippets Groups Projects
Verified Commit 8e2ac2cd authored by David Gunnarsson's avatar David Gunnarsson
Browse files

Temporarily make basics editable

if this will be like that in the future will be discussed, but for the first testing phase
parent 2dcab626
Branches
No related tags found
No related merge requests found
...@@ -10,15 +10,15 @@ class CopyrightPolicy < ApplicationPolicy ...@@ -10,15 +10,15 @@ class CopyrightPolicy < ApplicationPolicy
end end
def create? def create?
false user? && user.admin?
end end
def update? def update?
false user? && user.admin?
end end
def destroy? def destroy?
false user? && user.admin?
end end
class Scope < ApplicationPolicy::Scope class Scope < ApplicationPolicy::Scope
......
...@@ -10,15 +10,15 @@ class ImageSizePolicy < ApplicationPolicy ...@@ -10,15 +10,15 @@ class ImageSizePolicy < ApplicationPolicy
end end
def create? def create?
false user? && user.admin?
end end
def update? def update?
false user? && user.admin?
end end
def destroy? def destroy?
false user? && user.admin?
end end
class Scope < ApplicationPolicy::Scope class Scope < ApplicationPolicy::Scope
......
...@@ -10,15 +10,15 @@ class LiteraturePolicy < ApplicationPolicy ...@@ -10,15 +10,15 @@ class LiteraturePolicy < ApplicationPolicy
end end
def create? def create?
false user? && user.admin?
end end
def update? def update?
false user? && user.admin?
end end
def destroy? def destroy?
false user? && user.admin?
end end
class Scope < ApplicationPolicy::Scope class Scope < ApplicationPolicy::Scope
......
...@@ -10,15 +10,15 @@ class TextPolicy < ApplicationPolicy ...@@ -10,15 +10,15 @@ class TextPolicy < ApplicationPolicy
end end
def create? def create?
false user? && user.admin?
end end
def update? def update?
false user? && user.admin?
end end
def destroy? def destroy?
false user? && user.admin?
end end
class Scope < ApplicationPolicy::Scope class Scope < ApplicationPolicy::Scope
......
...@@ -39,9 +39,9 @@ RSpec.describe CopyrightPolicy do ...@@ -39,9 +39,9 @@ RSpec.describe CopyrightPolicy do
it { is_expected.to permit_action(:index) } it { is_expected.to permit_action(:index) }
it { is_expected.to permit_action(:show) } it { is_expected.to permit_action(:show) }
it { is_expected.to forbid_new_and_create_actions } it { is_expected.to permit_new_and_create_actions }
it { is_expected.to forbid_edit_and_update_actions } it { is_expected.to permit_edit_and_update_actions }
it { is_expected.to forbid_action(:destroy) } it { is_expected.to permit_action(:destroy) }
end end
describe "Scope" do describe "Scope" do
......
...@@ -39,9 +39,9 @@ RSpec.describe ImageSizePolicy do ...@@ -39,9 +39,9 @@ RSpec.describe ImageSizePolicy do
it { is_expected.to permit_action(:index) } it { is_expected.to permit_action(:index) }
it { is_expected.to permit_action(:show) } it { is_expected.to permit_action(:show) }
it { is_expected.to forbid_new_and_create_actions } it { is_expected.to permit_new_and_create_actions }
it { is_expected.to forbid_edit_and_update_actions } it { is_expected.to permit_edit_and_update_actions }
it { is_expected.to forbid_action(:destroy) } it { is_expected.to permit_action(:destroy) }
end end
describe "Scope" do describe "Scope" do
......
...@@ -39,9 +39,9 @@ RSpec.describe LiteraturePolicy do ...@@ -39,9 +39,9 @@ RSpec.describe LiteraturePolicy do
it { is_expected.to permit_action(:index) } it { is_expected.to permit_action(:index) }
it { is_expected.to permit_action(:show) } it { is_expected.to permit_action(:show) }
it { is_expected.to forbid_new_and_create_actions } it { is_expected.to permit_new_and_create_actions }
it { is_expected.to forbid_edit_and_update_actions } it { is_expected.to permit_edit_and_update_actions }
it { is_expected.to forbid_action(:destroy) } it { is_expected.to permit_action(:destroy) }
end end
describe "Scope" do describe "Scope" do
......
...@@ -39,9 +39,9 @@ RSpec.describe TextPolicy do ...@@ -39,9 +39,9 @@ RSpec.describe TextPolicy do
it { is_expected.to permit_action(:index) } it { is_expected.to permit_action(:index) }
it { is_expected.to permit_action(:show) } it { is_expected.to permit_action(:show) }
it { is_expected.to forbid_new_and_create_actions } it { is_expected.to permit_new_and_create_actions }
it { is_expected.to forbid_edit_and_update_actions } it { is_expected.to permit_edit_and_update_actions }
it { is_expected.to forbid_action(:destroy) } it { is_expected.to permit_action(:destroy) }
end end
describe "Scope" do describe "Scope" do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment