diff --git a/lib/alchemy/permissions.rb b/lib/alchemy/permissions.rb index f64489f9c3..49cc493ca2 100644 --- a/lib/alchemy/permissions.rb +++ b/lib/alchemy/permissions.rb @@ -36,7 +36,6 @@ def initialize(user) module GuestUser def alchemy_guest_user_rules can([:show, :download], Alchemy::Attachment) { |a| !a.restricted? } - can :see, Alchemy::Page, restricted: false can :read, Alchemy::Content, Alchemy::Content.available.not_restricted do |c| c.public? && !c.restricted? @@ -64,7 +63,6 @@ def alchemy_member_rules # Resources can [:show, :download], Alchemy::Attachment - can :see, Alchemy::Page, restricted: true can :read, Alchemy::Content, Alchemy::Content.available do |c| c.public? diff --git a/spec/libraries/permissions_spec.rb b/spec/libraries/permissions_spec.rb index a2f5cdbc6c..59041e0d03 100644 --- a/spec/libraries/permissions_spec.rb +++ b/spec/libraries/permissions_spec.rb @@ -39,11 +39,6 @@ is_expected.not_to be_able_to(:index, restricted_page) end - it "can only see public not restricted pages" do - is_expected.to be_able_to(:see, public_page) - is_expected.not_to be_able_to(:see, restricted_page) - end - it "can only see public not restricted elements" do is_expected.to be_able_to(:show, published_element) is_expected.not_to be_able_to(:show, restricted_element) @@ -79,10 +74,6 @@ is_expected.to be_able_to(:index, restricted_page) end - it "can see restricted pages" do - is_expected.to be_able_to(:see, restricted_page) - end - it "can see public restricted elements" do is_expected.to be_able_to(:show, published_element) is_expected.to be_able_to(:show, restricted_element) @@ -213,8 +204,8 @@ let(:user) { mock_model(Alchemy.user_class, alchemy_roles: []) } it "can only see public not restricted pages (like the guest role)" do - is_expected.to be_able_to(:see, public_page) - is_expected.not_to be_able_to(:see, restricted_page) + is_expected.to be_able_to(:show, public_page) + is_expected.not_to be_able_to(:show, restricted_page) end end end