Merge branch 'stable' into develop

This commit is contained in:
Jonne Haß 2015-10-07 22:29:45 +02:00
commit 92b5ea29ed
6 changed files with 35 additions and 8 deletions

View file

@ -97,6 +97,7 @@ With the port to Bootstrap 3, app/views/terms/default.haml has a new structure.
* Only post to the primary tumblr blog [#6386](https://github.com/diaspora/diaspora/pull/6386)
* Always show public photos on profile page [#6398](https://github.com/diaspora/diaspora/pull/6398)
* Expose Unicorn's pid option to our configuration system [#6411](https://github.com/diaspora/diaspora/pull/6411)
* Add stream of all public posts [#6465](https://github.com/diaspora/diaspora/pull/6465)
# 0.5.3.1

View file

@ -27,6 +27,7 @@ app.Router = Backbone.Router.extend({
"commented": "stream",
"liked": "stream",
"mentions": "stream",
"public": "stream",
"followed_tags": "followed_tags",
"tags/:name": "followed_tags",
"people/:id/photos": "photos",

View file

@ -5,7 +5,6 @@
class StreamsController < ApplicationController
before_action :authenticate_user!
before_action :save_selected_aspects, :only => :aspects
before_action :redirect_unless_admin, :only => :public
layout proc { request.format == :mobile ? "application" : "with_header" }

View file

@ -41,6 +41,8 @@
= render "aspects/aspect_listings", stream: @stream
%li.followed-tags-sidebar
= render "tags/followed_tags_listings"
%li{data: {stream: "public"}}
= link_to t("streams.public.title"), public_stream_path, rel: "backbone", class: "hoverable"
.col-md-6
#aspect_stream_container.stream_container

View file

@ -0,0 +1,30 @@
@javascript
Feature: The public stream
Background:
Given following users exist:
| username | email |
| Alice Smith | alice@alice.alice |
| Bob Jones | bob@bob.bob |
| Eve Doe | eve@eve.eve |
And a user with email "alice@alice.alice" is connected with "bob@bob.bob"
And "bob@bob.bob" has a public post with text "Bobs public post"
And "bob@bob.bob" has a non public post with text "Bobs private post"
And "eve@eve.eve" has a public post with text "Eves public post"
Scenario: seeing public posts of someone you don't follow
When I sign in as "alice@alice.alice"
Then I should not see "Eves public post"
When I am on the public stream page
Then I should see "Eves public post"
Scenario: seeing public posts of someone you follow
When I sign in as "alice@alice.alice"
Then I should see "Bobs public post"
When I am on the public stream page
Then I should see "Bobs public post"
Scenario: not seeing private posts of someone you follow
When I sign in as "alice@alice.alice"
Then I should see "Bobs private post"
When I am on the public stream page
Then I should not see "Bobs private post"

View file

@ -10,16 +10,10 @@ describe StreamsController, :type => :controller do
end
describe "#public" do
it 'will succeed if admin' do
Role.add_admin(alice.person)
it "succeeds" do
get :public
expect(response).to be_success
end
it 'will redirect if not' do
get :public
expect(response).to be_redirect
end
end
describe '#multi' do