Permalink
Browse files

Fix logic

  • Loading branch information...
1 parent 2745dc3 commit 373da82c10c2690c3bedcaf8b49c6c3b6f76570b @titanous titanous committed Oct 3, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/tentd/api/posts.rb
View
@@ -160,6 +160,7 @@ def authorize_post!(env)
env.authorized_scopes << :write_posts
elsif anonymous_publisher?(env.current_auth, post) && post != env['tent.entity']
env.authorized_scopes << :write_posts
+ post.original = false
elsif env.authorized_scopes.include?(:import_posts)
post.entity ||= env['tent.entity']
post.app ||= env.current_auth.app
@@ -172,7 +173,7 @@ def authorize_post!(env)
post.following_id = nil
post.id = nil
end
- post.original = post.entity == env['tent.entity']
+ post.original = post.entity == env['tent.entity'] if post.original.nil?
authorize_env!(env, :write_posts)
end

0 comments on commit 373da82

Please sign in to comment.