Use backend from glitch-soc for instance-only toots

This commit is contained in:
Renato "Lond" Cerqueira
2018-08-23 19:30:09 +02:00
parent ccc2f608c5
commit ffaa814bbe
11 changed files with 90 additions and 11 deletions

View File

@ -71,6 +71,18 @@ RSpec.describe StatusPolicy, type: :model do
expect(subject).to_not permit(viewer, status)
end
it 'denies access when local-only and the viewer is not logged in' do
allow(status).to receive(:local_only?) { true }
expect(subject).to_not permit(nil, status)
end
it 'denies access when local-only and the viewer is from another domain' do
viewer = Fabricate(:account, domain: 'remote-domain')
allow(status).to receive(:local_only?) { true }
expect(subject).to_not permit(viewer, status)
end
end
permissions :reblog? do