diff --git a/app/controllers/my_profile/cms_controller.rb b/app/controllers/my_profile/cms_controller.rb index 75bd8e1..90ed57c 100644 --- a/app/controllers/my_profile/cms_controller.rb +++ b/app/controllers/my_profile/cms_controller.rb @@ -75,11 +75,10 @@ class CmsController < MyProfileController @article.article_privacy_exceptions = params[:q].split(/,/).map{|n| environment.people.find n.to_i} unless params[:q].nil? @tokenized_children = prepare_to_token_input( - profile.members.map{|m| - m if @article.article_privacy_exceptions.include?(m) - }.compact + profile.members.includes(:articles_with_access).find_all{ |m| + m.articles_with_access.include?(@article) + } ) - refuse_blocks record_coming if request.post? diff --git a/app/helpers/article_helper.rb b/app/helpers/article_helper.rb index 6588979..c14c3b7 100644 --- a/app/helpers/article_helper.rb +++ b/app/helpers/article_helper.rb @@ -57,7 +57,7 @@ module ArticleHelper radio_button(:article, :published, false) + content_tag('label', _('Private'), :for => 'article_published_false', :id => "label_private") ) + - (article.profile.class == Community ? content_tag('div', + (article.profile.community? ? content_tag('div', content_tag('label', _('Fill in the search field to add the exception users to see this content'), :id => "text-input-search-exception-users") + token_input_field_tag(:q, 'search-article-privacy-exceptions', {:action => 'search_article_privacy_exceptions'}, {:focus => false, :hint_text => _('Type in a search term for a user'), :pre_populate => tokenized_children})) : diff --git a/db/schema.rb b/db/schema.rb index a80e3a3..afa3e66 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -465,7 +465,6 @@ ActiveRecord::Schema.define(:version => 20140108132730) do t.boolean "is_template", :default => false t.integer "template_id" t.string "redirection_after_login" - t.text "settings" end add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" -- libgit2 0.21.2