Index: app/models/role.rb
===================================================================
--- app/models/role.rb	(revision 6631)
+++ app/models/role.rb	(working copy)
@@ -25,6 +25,12 @@
     ['default', :label_issues_visibility_public],
     ['own', :label_issues_visibility_own]
   ]
+  
+  DOCUMENTS_VISIBILITY_OPTIONS = [
+    ['all', :label_documents_visibility_all],
+    ['default', :label_documents_visibility_public],
+    ['own', :label_documents_visibility_own]
+  ]
 
   named_scope :givable, { :conditions => "builtin = 0", :order => 'position' }
   named_scope :builtin, lambda { |*args|
@@ -52,11 +58,14 @@
   validates_inclusion_of :issues_visibility,
     :in => ISSUES_VISIBILITY_OPTIONS.collect(&:first),
     :if => lambda {|role| role.respond_to?(:issues_visibility)}
+  validates_inclusion_of :documents_visibility,
+    :in => DOCUMENTS_VISIBILITY_OPTIONS.collect(&:first),
+    :if => lambda {|role| role.respond_to?(:documents_visibility)}
   
   def permissions
     read_attribute(:permissions) || []
   end
-  
+ 
   def permissions=(perms)
     perms = perms.collect {|p| p.to_sym unless p.blank? }.compact.uniq if perms
     write_attribute(:permissions, perms)
Index: app/models/document.rb
===================================================================
--- app/models/document.rb	(revision 6631)
+++ app/models/document.rb	(working copy)
@@ -18,24 +18,47 @@
 class Document < ActiveRecord::Base
   belongs_to :project
   belongs_to :category, :class_name => "DocumentCategory", :foreign_key => "category_id"
+  belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
+  belongs_to :assigned_to, :class_name => 'User', :foreign_key => 'assigned_to_id'
   acts_as_attachable :delete_permission => :manage_documents
 
   acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project
   acts_as_event :title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"},
                 :author => Proc.new {|o| (a = o.attachments.find(:first, :order => "#{Attachment.table_name}.created_on ASC")) ? a.author : nil },
                 :url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.id}}
-  acts_as_activity_provider :find_options => {:include => :project}
+  acts_as_activity_provider :find_options => {:include => [:project, :author]},
+                            :author_key => :author_id
 
   validates_presence_of :project, :title, :category
   validates_length_of :title, :maximum => 60
-
-  named_scope :visible, lambda {|*args| { :include => :project,
-                                          :conditions => Project.allowed_to_condition(args.shift || User.current, :view_documents, *args) } }
-
+  
+def self.all_visible(visible_role,project,user=User.current) 
+   if(user.allowed_to?(:view_documents, project))
+    case visible_role
+        when 'all'
+         all  :include => [:attachments, :category]
+        when 'default'
+         all  :include => [:attachments, :category], :conditions => ['is_private = 0 or author_id=? or assigned_to_id=?',user.id,user.id]  
+        when 'own'
+         all  :include => [:attachments, :category], :conditions => ['author_id=? or assigned_to_id=?',user.id,user.id]   
+        else
+         all :include => [:attachments, :category]
+     end
+   end
+ end 
+  
+  # Users the document can be assigned to
+  def assignable_users
+    users = project.assignable_users
+    users << author if author
+    users.uniq.sort
+  end
+  
   def visible?(user=User.current)
-    !user.nil? && user.allowed_to?(:view_documents, project)
+   
+   !user.nil? && user.allowed_to?(:view_documents, project)
   end
-
+  
   def after_initialize
     if new_record?
       self.category ||= DocumentCategory.default

Index: app/controllers/documents_controller.rb
===================================================================
--- app/controllers/documents_controller.rb	(revision 6631)
+++ app/controllers/documents_controller.rb	(working copy)
@@ -26,8 +26,28 @@
   helper :attachments
   
   def index
+    
     @sort_by = %w(category date title author).include?(params[:sort_by]) ? params[:sort_by] : 'category'
-    documents = @project.documents.find :all, :include => [:attachments, :category]
+    
+      sql = "SELECT role_id,documents_visibility"
+      sql << " FROM #{Member.table_name}"
+      sql << " INNER JOIN #{MemberRole.table_name} ON #{MemberRole.table_name}.member_id = #{Member.table_name}.id"
+      sql << " INNER JOIN #{Role.table_name} ON #{Role.table_name}.id = #{MemberRole.table_name}.role_id"
+      sql << " WHERE"
+      sql << " #{Member.table_name}.project_id = #{@project.id} AND #{Member.table_name}.user_id = #{User.current.id}"
+     
+      
+      @role = ActiveRecord::Base.connection.select_all(sql)
+      
+      @role.each do |row|
+        @role_visible = row['documents_visibility']
+      end
+        
+     #logger.debug("role visible is #{@role_visible}")                            
+     
+    
+    documents = Document.all_visible @role_visible,@project
+    
     case @sort_by
     when 'date'
       @grouped = documents.group_by {|d| d.updated_on.to_date }
@@ -39,6 +59,10 @@
       @grouped = documents.group_by(&:category)
     end
     @document = @project.documents.build
+    
+    
+   
+    
     render :layout => false if request.xhr?
   end
   
@@ -47,7 +71,8 @@
   end
 
   def new
-    @document = @project.documents.build(params[:document])    
+    @document = @project.documents.build(params[:document])  
+    @document.author = User.current
     if request.post? and @document.save	
       attachments = Attachment.attach_files(@document, params[:attachments])
       render_attachment_warning_if_needed(@document)
Index: app/views/roles/_form.rhtml
===================================================================
--- app/views/roles/_form.rhtml	(revision 6631)
+++ app/views/roles/_form.rhtml	(working copy)
@@ -6,6 +6,7 @@
 <p><%= f.check_box :assignable %></p>
 <% end %>
 <p><%= f.select :issues_visibility, Role::ISSUES_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %></p>
+<p><%= f.select :documents_visibility, Role::DOCUMENTS_VISIBILITY_OPTIONS.collect {|v| [l(v.last), v.first]} %></p>
 <% if @role.new_record? && @roles.any? %>
 <p><label><%= l(:label_copy_workflow_from) %></label>
 <%= select_tag(:copy_workflow_from, content_tag("option") + options_from_collection_for_select(@roles, :id, :name)) %></p>

Index: app/views/documents/_form.rhtml
===================================================================
--- app/views/documents/_form.rhtml	(revision 6631)
+++ app/views/documents/_form.rhtml	(working copy)
@@ -1,15 +1,25 @@
 <%= error_messages_for 'document' %>
 <div class="box">
 <!--[form:document]-->
+
 <p><label for="document_category_id"><%=l(:field_category)%></label>
 <%= select('document', 'category_id', DocumentCategory.all.collect {|c| [c.name, c.id]}) %></p>
 
+<p><label for="document_assigned_to_id"><%=l(:field_assigned_to)%></label>
+<%= select('document', 'assigned_to_id', @document.assignable_users.collect {|c| [c.name, c.id]}) %></p>
+
 <p><label for="document_title"><%=l(:field_title)%> <span class="required">*</span></label>
 <%= text_field 'document', 'title', :size => 60 %></p>
 
 <p><label for="document_description"><%=l(:field_description)%></label>
 <%= text_area 'document', 'description', :cols => 60, :rows => 15, :class => 'wiki-edit' %></p>
+
+<p>
+ <label class="inline" for="document_is_private"><%=l(:field_is_private)%></label>
+<%= check_box 'document', 'is_private'%>
+</p>
 <!--[eoform:document]-->
 </div>
 
+
 <%= wikitoolbar_for 'document_description' %>

Index: config/locales/lt.yml
===================================================================
--- config/locales/lt.yml	(revision 6631)
+++ config/locales/lt.yml	(working copy)
@@ -1016,11 +1016,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Commit pranešimų koduotė
   field_scm_path_encoding: Path encoding
Index: config/locales/sr-YU.yml
===================================================================
--- config/locales/sr-YU.yml	(revision 6631)
+++ config/locales/sr-YU.yml	(working copy)
@@ -956,11 +956,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Kodiranje izvršnih poruka
   field_scm_path_encoding: Path encoding
Index: config/locales/ro.yml
===================================================================
--- config/locales/ro.yml	(revision 6631)
+++ config/locales/ro.yml	(working copy)
@@ -949,11 +949,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Codare pentru mesaje
   field_scm_path_encoding: Path encoding
Index: config/locales/lv.yml
===================================================================
--- config/locales/lv.yml	(revision 6631)
+++ config/locales/lv.yml	(working copy)
@@ -951,11 +951,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Kodēt ziņojumus
   field_scm_path_encoding: Path encoding
Index: config/locales/zh.yml
===================================================================
--- config/locales/zh.yml	(revision 6631)
+++ config/locales/zh.yml	(working copy)
@@ -963,6 +963,9 @@
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
 
   field_commit_logs_encoding: 提交注释的编码
Index: config/locales/pt.yml
===================================================================
--- config/locales/pt.yml	(revision 6631)
+++ config/locales/pt.yml	(working copy)
@@ -961,11 +961,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Encoding das mensagens de commit
   field_scm_path_encoding: Path encoding
Index: config/locales/ca.yml
===================================================================
--- config/locales/ca.yml	(revision 6631)
+++ config/locales/ca.yml	(working copy)
@@ -959,11 +959,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Codificació dels missatges publicats
   field_scm_path_encoding: Path encoding
Index: config/locales/pt-BR.yml
===================================================================
--- config/locales/pt-BR.yml	(revision 6631)
+++ config/locales/pt-BR.yml	(working copy)
@@ -977,6 +977,7 @@
   label_role_non_member: Não Membro
   label_issues_visibility_own: Tarefas criadas ou atribuídas ao usuário
   field_issues_visibility: Visibilidade das tarefas
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: Todas as tarefas
   permission_set_own_issues_private: Alterar as próprias tarefas para públicas ou privadas
   field_is_private: Privado
Index: config/locales/tr.yml
===================================================================
--- config/locales/tr.yml	(revision 6631)
+++ config/locales/tr.yml	(working copy)
@@ -975,6 +975,7 @@
   label_issue_priority_updated: Öncelik güncellendi
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: İşlerin görünürlüğü
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: Tüm işler
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Özel
Index: config/locales/ru.yml
===================================================================
--- config/locales/ru.yml	(revision 6631)
+++ config/locales/ru.yml	(working copy)
@@ -1069,6 +1069,7 @@
   label_issue_priority_updated: Приоритет обновлен
   label_issues_visibility_own: Задачи созданные или назначенные пользователю
   field_issues_visibility: Видимость задач
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: Все задачи
   permission_set_own_issues_private: Устанавливать видимость (общая/частная) для собственных задач
   field_is_private: Частная
Index: config/locales/en-GB.yml
===================================================================
--- config/locales/en-GB.yml	(revision 6631)
+++ config/locales/en-GB.yml	(working copy)
@@ -959,11 +959,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Commit messages encoding
   field_scm_path_encoding: Path encoding
Index: config/locales/id.yml
===================================================================
--- config/locales/id.yml	(revision 6631)
+++ config/locales/id.yml	(working copy)
@@ -964,11 +964,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Commit messages encoding
   field_scm_path_encoding: Path encoding
Index: config/locales/el.yml
===================================================================
--- config/locales/el.yml	(revision 6631)
+++ config/locales/el.yml	(working copy)
@@ -956,11 +956,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Κωδικοποίηση μηνυμάτων commit
   field_scm_path_encoding: Path encoding
Index: config/locales/en.yml
===================================================================
--- config/locales/en.yml	(revision 6631)
+++ config/locales/en.yml	(working copy)
@@ -308,6 +308,7 @@
   field_visible: Visible
   field_warn_on_leaving_unsaved: "Warn me when leaving a page with unsaved text"
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   field_is_private: Private
   field_commit_logs_encoding: Commit messages encoding
   field_scm_path_encoding: Path encoding
@@ -819,6 +820,9 @@
   label_issues_visibility_all: All issues
   label_issues_visibility_public: All non private issues
   label_issues_visibility_own: Issues created by or assigned to the user
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   label_git_report_last_commit: Report last commit for files and directories
 
   button_login: Login
Index: config/locales/gl.yml
===================================================================
--- config/locales/gl.yml	(revision 6631)
+++ config/locales/gl.yml	(working copy)
@@ -968,11 +968,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Codificación das mensaxes de commit
   field_scm_path_encoding: Path encoding
Index: config/locales/cs.yml
===================================================================
--- config/locales/cs.yml	(revision 6631)
+++ config/locales/cs.yml	(working copy)
@@ -960,11 +960,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Kódování zpráv při commitu
   field_scm_path_encoding: Path encoding
Index: config/locales/es.yml
===================================================================
--- config/locales/es.yml	(revision 6631)
+++ config/locales/es.yml	(working copy)
@@ -993,6 +993,7 @@
   label_issue_priority_updated: Prioridad actualizada
   label_issues_visibility_own: Peticiones creadas por el usuario o asignadas a él
   field_issues_visibility: Visibilidad de las peticiones
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: Todas las peticiones
   permission_set_own_issues_private: Poner las peticiones propias como públicas o privadas
   field_is_private: Privada
Index: config/locales/mk.yml
===================================================================
--- config/locales/mk.yml	(revision 6631)
+++ config/locales/mk.yml	(working copy)
@@ -956,11 +956,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Commit messages encoding
   field_scm_path_encoding: Path encoding
Index: config/locales/eu.yml
===================================================================
--- config/locales/eu.yml	(revision 6631)
+++ config/locales/eu.yml	(working copy)
@@ -960,6 +960,7 @@
   label_issue_priority_updated: Lehentasuna eguneratuta
   label_issues_visibility_own: Erabiltzaileak sortu edo esleituta dituen zereginak
   field_issues_visibility: Zeregin ikusgarritasuna
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: Zeregin guztiak
   permission_set_own_issues_private: Nork bere zereginak publiko edo pribatu jarri
   field_is_private: Pribatu
Index: config/locales/ko.yml
===================================================================
--- config/locales/ko.yml	(revision 6631)
+++ config/locales/ko.yml	(working copy)
@@ -1008,11 +1008,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: 제출(commit) 기록 인코딩
   field_scm_path_encoding: Path encoding
Index: config/locales/mn.yml
===================================================================
--- config/locales/mn.yml	(revision 6631)
+++ config/locales/mn.yml	(working copy)
@@ -957,11 +957,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Коммит хийх үед харуулах текстүүдийн энкодинг
   field_scm_path_encoding: Path encoding
Index: config/locales/it.yml
===================================================================
--- config/locales/it.yml	(revision 6631)
+++ config/locales/it.yml	(working copy)
@@ -957,6 +957,7 @@
   label_issue_priority_updated: Priorità aggiornata
   label_issues_visibility_own: Segnalazioni create o assegnate all'utente
   field_issues_visibility: Visibilità segnalazioni
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: Tutte le segnalazioni
   permission_set_own_issues_private: Imposta le proprie segnalazioni pubbliche o private
   field_is_private: Privato
Index: config/locales/sk.yml
===================================================================
--- config/locales/sk.yml	(revision 6631)
+++ config/locales/sk.yml	(working copy)
@@ -951,11 +951,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Kódovanie prenášaných správ
   field_scm_path_encoding: Path encoding
Index: config/locales/sl.yml
===================================================================
--- config/locales/sl.yml	(revision 6631)
+++ config/locales/sl.yml	(working copy)
@@ -952,11 +952,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Kodiranje sporočil ob predaji
   field_scm_path_encoding: Path encoding
Index: config/locales/uk.yml
===================================================================
--- config/locales/uk.yml	(revision 6631)
+++ config/locales/uk.yml	(working copy)
@@ -952,11 +952,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Commit messages encoding
   field_scm_path_encoding: Path encoding
Index: config/locales/sr.yml
===================================================================
--- config/locales/sr.yml	(revision 6631)
+++ config/locales/sr.yml	(working copy)
@@ -957,11 +957,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Кодирање извршних порука
   field_scm_path_encoding: Path encoding
Index: config/locales/da.yml
===================================================================
--- config/locales/da.yml	(revision 6631)
+++ config/locales/da.yml	(working copy)
@@ -973,11 +973,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Kodning af Commit beskeder
   field_scm_path_encoding: Path encoding
Index: config/locales/fa.yml
===================================================================
--- config/locales/fa.yml	(revision 6631)
+++ config/locales/fa.yml	(working copy)
@@ -959,11 +959,15 @@
   label_issue_priority_updated: برتری بروز شد
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: کدگذاری پیام‌های انباره
   field_scm_path_encoding: Path encoding
Index: config/locales/sv.yml
===================================================================
--- config/locales/sv.yml	(revision 6631)
+++ config/locales/sv.yml	(working copy)
@@ -350,6 +350,7 @@
   field_visible: Synlig
   field_warn_on_leaving_unsaved: Varna om jag lämnar en sida med osparad text
   field_issues_visibility: Ärendesynlighet
+  field_documents_visibility: Documents visibility
   field_is_private: Privat
   field_commit_logs_encoding: Teckenuppsättning för commit-meddelanden
   field_scm_path_encoding: Sökvägskodning
Index: config/locales/de.yml
===================================================================
--- config/locales/de.yml	(revision 6631)
+++ config/locales/de.yml	(working copy)
@@ -974,6 +974,7 @@
   label_issue_priority_updated: Priorität aktualisiert
   label_issues_visibility_own: Tickets die folgender User erstellt hat oder die ihm zugewiesen sind
   field_issues_visibility: Ticket Sichtbarkeit
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: Alle Tickets
   permission_set_own_issues_private: Eigene Tickets privat oder öffentlich markieren
   field_is_private: Privat
Index: config/locales/bg.yml
===================================================================
--- config/locales/bg.yml	(revision 6631)
+++ config/locales/bg.yml	(working copy)
@@ -308,6 +308,7 @@
   field_visible: Видим
   field_warn_on_leaving_unsaved: Предупреди ме, когато напускам страница с незаписано съдържание
   field_issues_visibility: Видимост на задачите
+  field_documents_visibility: Documents visibility
   field_is_private: Лична
   field_commit_logs_encoding: Кодова таблица на съобщенията при поверяване
   field_scm_path_encoding: Кодова таблица на пътищата (path)
Index: config/locales/ja.yml
===================================================================
--- config/locales/ja.yml	(revision 6631)
+++ config/locales/ja.yml	(working copy)
@@ -1000,6 +1000,7 @@
   label_issue_priority_updated: 優先度が更新されました
   label_issues_visibility_own: 作成者か担当者であるチケット
   field_issues_visibility: 表示できるチケット
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: すべてのチケット
   permission_set_own_issues_private: 自分のチケットをプライベートに設定
   field_is_private: プライベート
Index: config/locales/he.yml
===================================================================
--- config/locales/he.yml	(revision 6631)
+++ config/locales/he.yml	(working copy)
@@ -961,11 +961,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: קידוד הודעות הפקדה
   field_scm_path_encoding: Path encoding
Index: config/locales/fi.yml
===================================================================
--- config/locales/fi.yml	(revision 6631)
+++ config/locales/fi.yml	(working copy)
@@ -977,11 +977,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Tee viestien koodaus
   field_scm_path_encoding: Path encoding
Index: config/locales/bs.yml
===================================================================
--- config/locales/bs.yml	(revision 6631)
+++ config/locales/bs.yml	(working copy)
@@ -970,11 +970,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: 'Enkodiranje "commit" poruka'
   field_scm_path_encoding: Path encoding
Index: config/locales/fr.yml
===================================================================
--- config/locales/fr.yml	(revision 6631)
+++ config/locales/fr.yml	(working copy)
@@ -312,6 +312,7 @@
   field_visible: Visible
   field_warn_on_leaving_unsaved: "M'avertir lorsque je quitte une page contenant du texte non sauvegardé"
   field_issues_visibility: Visibilité des demandes
+  field_documents_visibility: Documents visibility
   field_is_private: Privée
   field_commit_logs_encoding: Encodage des messages de commit
 
Index: config/locales/nl.yml
===================================================================
--- config/locales/nl.yml	(revision 6631)
+++ config/locales/nl.yml	(working copy)
@@ -938,11 +938,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Encodering van commit berichten
   field_scm_path_encoding: Path encoding
Index: config/locales/hr.yml
===================================================================
--- config/locales/hr.yml	(revision 6631)
+++ config/locales/hr.yml	(working copy)
@@ -963,11 +963,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Commit messages encoding
   field_scm_path_encoding: Path encoding
Index: config/locales/pl.yml
===================================================================
--- config/locales/pl.yml	(revision 6631)
+++ config/locales/pl.yml	(working copy)
@@ -973,11 +973,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Kodowanie komentarzy zatwierdzeń
   field_scm_path_encoding: Path encoding
Index: config/locales/th.yml
===================================================================
--- config/locales/th.yml	(revision 6631)
+++ config/locales/th.yml	(working copy)
@@ -953,11 +953,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Commit messages encoding
   field_scm_path_encoding: Path encoding
Index: config/locales/no.yml
===================================================================
--- config/locales/no.yml	(revision 6631)
+++ config/locales/no.yml	(working copy)
@@ -943,11 +943,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Tegnkoding for innsendingsmeldinger
   field_scm_path_encoding: Path encoding
Index: config/locales/hu.yml
===================================================================
--- config/locales/hu.yml	(revision 6631)
+++ config/locales/hu.yml	(working copy)
@@ -975,6 +975,7 @@
   label_issue_priority_updated: Prioritás módosítva
   label_issues_visibility_own: A felhasználó által létrehozott vagy hozzárendelt feladatok
   field_issues_visibility: Feladatok láthatósága
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: Minden feladat
   permission_set_own_issues_private: Saját feladatok beállítása nyilvánosra vagy privátra
   field_is_private: Privát
Index: config/locales/vi.yml
===================================================================
--- config/locales/vi.yml	(revision 6631)
+++ config/locales/vi.yml	(working copy)
@@ -1007,11 +1007,15 @@
   label_issue_priority_updated: Priority updated
   label_issues_visibility_own: Issues created by or assigned to the user
   field_issues_visibility: Issues visibility
+  field_documents_visibility: Documents visibility
   label_issues_visibility_all: All issues
   permission_set_own_issues_private: Set own issues public or private
   field_is_private: Private
   permission_set_issues_private: Set issues public or private
   label_issues_visibility_public: All non private issues
+  label_documents_visibility_public: All non private documents
+  label_documents_visibility_own: Documents created by or assigned to the user
+  label_documents_visibility_all: All Documents
   text_issues_destroy_descendants_confirmation: This will also delete %{count} subtask(s).
   field_commit_logs_encoding: Commit messages encoding
   field_scm_path_encoding: Path encoding

 
