Giter Club home page Giter Club logo

redmine_private_wiki's People

Contributors

cforce avatar ch3sh1r avatar edmagne avatar f0yme avatar fcrespel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redmine_private_wiki's Issues

NoMethodError in Wiki#show on nonpublic projects

When non member tries to see private page from non public project it gets error

 Showing vendor/plugins/redmine_private_wiki/app/views/hooks/_body_bottom.html.erb where line #3 raised:

undefined method `private?' for nil:NilClass

Extracted source (around line #3):

1: <% if controller and controller.class.name == 'WikiController' and controller.action_name == "show" and @page.id %>
2: 
3:     <%= link_to_if_authorized(l(:button_hide_wiki), {:action => 'change_privacy', :id => @page.title, :private => 1}, :method => :post, :class => 'icon icon-hide') if [email protected]? %>
4:     <%= link_to_if_authorized(l(:button_reveal_wiki), {:action => 'change_privacy', :id => @page.title, :private => 0}, :method => :post, :class => 'icon icon-reveal') if @page.private? %>
5: 
6:     <% if @page.private? %>

Solution is simple - just add additional check in first line of _body_bottom.html.erb

<% if controller and controller.class.name == 'WikiController' and controller.action_name == "show" and @page and @page.id %>

Note and @page as new part of condition

Error in redmine 2.2

The fix in #20 makes the plugin incompatible with redmine 2.2. It doesn't work:

NoMethodError (undefined method `project_wiki_page_path' for #WikiController:0x91c7dd0):

I changed the code back

redirect_to project_wiki_page_path(@project, @page.title)

    redirect_to project_wiki_path(@project, @page.title)

And it works with my redmine 2.2.3.stable

License

Hi, I would like to make some modifications to this plugin (e.g. add tests, ensure ChiliProject compatibility) but I am not sure under what conditions I can fork and change this plugin.
Could you please specify copyright conditions and license for this plugin (and add LICENSE file)? Thank you!

Redmine 3

Will this work with Redmine 3.1.0? Trying to install and I receive an error:

[!] There was an error parsing `Gemfile`:
[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
You specified: simplecov (~> 0.9.1) and simplecov (>= 0). Bundler cannot continue.

 #  from /data/web/redmine/redmine-3.1.0/plugins/redmine_private_wiki/Gemfile:4
 #  -------------------------------------------
 #  group :development, :test do
 >    gem 'simplecov'
 #    gem 'simplecov-rcov'
 #  -------------------------------------------
. Bundler cannot continue.

 #  from /data/web/redmine/redmine-3.1.0/Gemfile:110
 #  -------------------------------------------
 #  Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
 >    eval_gemfile file
 #  end
 #  -------------------------------------------

Not real familiar with Ruby so don't know if this is a problem with our install or the plugin.

Amend wiki / code for database

Not a bug so much, but when I installed the plugin I had to define the development database connection within redmine/config/database.yml which is fine, but if a novice user gets:

rake aborted!
Access denied for user 'root'@'localhost' (using password: NO)

or anything similar then they may struggle to find the problem.

Would it be better to:

Add these details into the read me
or
Amend the code to ignore the development connect if not defined correctly?

500 when installed along with "Close Issue button" plugin

Steps to reproduce:

in production.log we have:

Started GET "/issues/668" for 91.76.115.167 at 2012-09-06 00:51:09 +0400
Processing by IssuesController#show as HTML
  Parameters: {"id"=>"668"}
  Rendered issues/_action_menu.html.erb (11.5ms)
  Rendered plugins/redmine_close_button/app/views/issues/_close_button.html.erb (1.4ms)
  Rendered issue_relations/_form.html.erb (2.7ms)
  Rendered issues/_relations.html.erb (6.2ms)
  Rendered issues/_history.html.erb (51.4ms)
  Rendered issues/_action_menu.html.erb (3.4ms)
  Rendered issues/_form_custom_fields.html.erb (0.5ms)
  Rendered issues/_attributes.html.erb (34.3ms)
  Rendered issues/_form.html.erb (52.0ms)
  Rendered attachments/_form.html.erb (3.4ms)
  Rendered issues/_edit.html.erb (130.1ms)
  Rendered issues/_sidebar.html.erb (6.6ms)
  Rendered watchers/_watchers.html.erb (69.1ms)
  Rendered issues/show.html.erb within layouts/base (428.1ms)
Completed 500 Internal Server Error in 1006ms

ActionView::Template::Error (Missing partial hooks/html_header with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :rsb, :rjs]}. Searched in:
  * "/redmine/plugins/redmine_close_button/app/views"
  * "/redmine/app/views"
):
    18:       body {behavior: url(<%= stylesheet_path "csshover.htc" %>);}
    19:     </style>
    20: <![endif]-->
    21: <%= call_hook :view_layouts_base_html_head %>
    22: <!-- page specific tags -->
    23: <%= yield :header_tags -%>
    24: </head>
  lib/redmine/hook.rb:110:in `block in render_on'
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
  lib/redmine/hook.rb:61:in `each'
  lib/redmine/hook.rb:61:in `block in call_hook'
  lib/redmine/hook.rb:58:in `tap'
  lib/redmine/hook.rb:58:in `call_hook'
  lib/redmine/hook.rb:151:in `call_hook'
  app/views/layouts/base.html.erb:21:in `_app_views_layouts_base_html_erb__4075490176800572136_42316900'
  app/controllers/issues_controller.rb:118:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:115:in `show'

error @page is nil in function change privacy when you click hide icon at the bottom of the page while creating a wiki

hide symbol comes at the bottom when creating a wiki

when clicked on it, page with error occurs which says

You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.update_attribute

on this function

def change_privacy
find_existing_page
@page.update_attribute :private, params[:private]
redirect_to :action => 'show', :project_id => @project, :id => @page.title
end

using redmine-1.3.

bug on redmine 2.3.1 - locked out when clicking 'hide' in wiki

There is no error in console, but warnings which says
Can't verify csrf token authenticity
after this i am anonymous user and get the login maks (because my redmine instance is private)

Don't have this problems with regular wiki usage.

Any idea?

Rails 3

Please update code to support Rails 3.

How to add a different group to each page

Thanks for the plugin. It would be very useful to have a group access control for each page. Any comments on how to do this or some other way to have many private pages with different access lists?

Error in redmine 2.3

ActionView::Template::Error (undefined method `private' for #):                                             
    1: <% if controller and controller.class.name == 'WikiController' and controller.action_name == "show" and                         
    2:         @page and @page.id and @page.visible? %>                                                                                
    3:                                                                                                                                 
    4:     <%= link_to_if_authorized(l(:button_hide_wiki), {:action => 'change_privacy', :id => @page.title, :private => 1}, :method =>
 :post, :class => 'icon icon-hide') if [email protected]? %>                                                                              
    5:     <%= link_to_if_authorized(l(:button_reveal_wiki), {:action => 'change_privacy', :id => @page.title, :private => 0}, :method 
=> :post, :class => 'icon icon-reveal') if @page.private? %>                                                                           
  lib/redmine/hook.rb:111:in `block in render_on'                                                                                      
  lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'                                                                            
  lib/redmine/hook.rb:61:in `each'                                                                                                     
  lib/redmine/hook.rb:61:in `block in call_hook'                                                                                       
  lib/redmine/hook.rb:58:in `tap'                                                                                                      
  lib/redmine/hook.rb:58:in `call_hook'                                                                                                
  lib/redmine/hook.rb:158:in `call_hook'                                                                                               
  app/views/layouts/base.html.erb:75:in `_app_views_layouts_base_html_erb___3045660557403982530_62662640'                              
  app/controllers/wiki_controller.rb:99:in `show'  

EDIT:

For some reason migration didn't go?!
I had to manually add column to wiki_pages

Redmine 2.1.4: TypeError (can't convert Symbol into Integer):

This error occours on this repo extended with the chnages from tdvsdv fork.

TypeError (can't convert Symbol into Integer):
org/jruby/RubyString.java:3668:in []' plugins/redmine_wiki_extensions/lib/wiki_extensions_wiki_controller_patch.rb:46:inrender_with_wiki_extensions'
plugins/redmine_gsc_plantillas/lib/wiki_controller_patch.rb:52:in edit_with_template' plugins/redmine_private_wiki/lib/private_wiki/wiki_controller_patch.rb:22:inedit_with_private_wiki'
org/jruby/RubyBasicObject.java:1667:in __send__' org/jruby/RubyKernel.java:2077:insend'
actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in send_action' actionpack (3.2.8) lib/abstract_controller/base.rb:167:inprocess_action'
actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in process_action' actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:inprocess_action'
activesupport (3.2.8) lib/active_support/callbacks.rb:505:in _run__1161538618__process_action__1648802044__callbacks' org/jruby/RubyBasicObject.java:1667:insend'
org/jruby/RubyKernel.java:2077:in send' activesupport (3.2.8) lib/active_support/callbacks.rb:405:inrun_callback'
activesupport (3.2.8) lib/active_support/callbacks.rb:390:in _run_process_action_callbacks' org/jruby/RubyBasicObject.java:1673:in__send
'
org/jruby/RubyKernel.java:2081:in send' activesupport (3.2.8) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:17:in process_action' actionpack (3.2.8) lib/action_controller/metal/rescue.rb:29:inprocess_action'
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:30:in process_action' activesupport (3.2.8) lib/active_support/notifications.rb:123:ininstrument'
activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in instrument' activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:19:ininstrument'
activesupport (3.2.8) lib/active_support/notifications.rb:123:in instrument' actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:29:inprocess_action'
actionpack (3.2.8) lib/action_controller/metal/params_wrapper.rb:207:in process_action' activerecord (3.2.8) lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
actionpack (3.2.8) lib/abstract_controller/base.rb:121:in process' actionpack (3.2.8) lib/abstract_controller/rendering.rb:45:inprocess'
actionpack (3.2.8) lib/action_controller/metal.rb:203:in dispatch' actionpack (3.2.8) lib/action_controller/metal/rack_delegation.rb:14:indispatch'
actionpack (3.2.8) lib/action_controller/metal.rb:246:in action' org/jruby/RubyProc.java:249:incall'
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in dispatch' actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:36:incall'
journey (1.0.4) lib/journey/router.rb:68:in call' org/jruby/RubyArray.java:1612:ineach'
journey (1.0.4) lib/journey/router.rb:56:in call' actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:incall'
rack-openid (1.3.1) lib/rack/openid.rb:98:in call' actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:incall'
rack (1.4.1) lib/rack/etag.rb:23:in call' rack (1.4.1) lib/rack/conditionalget.rb:25:incall'
actionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in call' actionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:incall'
plugins/redmine_dmsf/lib/redmine_dmsf/webdav/no_parse.rb:33:in call' actionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:incall'
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in context' rack (1.4.1) lib/rack/session/abstract/id.rb:200:incall'
actionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:in call' activerecord (3.2.8) lib/active_record/query_cache.rb:64:incall'
activerecord (3.2.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in call' actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:incall'
activesupport (3.2.8) lib/active_support/callbacks.rb:408:in _run__572808__call__30809828__callbacks' org/jruby/RubyBasicObject.java:1667:insend'
org/jruby/RubyKernel.java:2077:in send' activesupport (3.2.8) lib/active_support/callbacks.rb:405:inrun_callback'
activesupport (3.2.8) lib/active_support/callbacks.rb:390:in _run_call_callbacks' org/jruby/RubyBasicObject.java:1667:in__send
'
org/jruby/RubyKernel.java:2077:in send' activesupport (3.2.8) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:incall'
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:in call' actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:incall'
railties (3.2.8) lib/rails/rack/logger.rb:26:in call_app' railties (3.2.8) lib/rails/rack/logger.rb:16:incall'
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in call' rack (1.4.1) lib/rack/methodoverride.rb:21:incall'
rack (1.4.1) lib/rack/runtime.rb:17:in call' activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:incall'
rack (1.4.1) lib/rack/lock.rb:15:in call' actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:incall'
rack-cache (1.2) lib/rack/cache/context.rb:136:in forward' rack-cache (1.2) lib/rack/cache/context.rb:245:infetch'
rack-cache (1.2) lib/rack/cache/context.rb:185:in lookup' rack-cache (1.2) lib/rack/cache/context.rb:66:incall!'
rack-cache (1.2) lib/rack/cache/context.rb:51:in call' railties (3.2.8) lib/rails/engine.rb:479:incall'
railties (3.2.8) lib/rails/application.rb:223:in call' rack (1.4.1) lib/rack/content_length.rb:14:incall'
railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in call' rack (1.4.1) lib/rack/handler/webrick.rb:59:inservice'
/home/sidfunktion/.rvm/rubies/jruby-1.7.0/lib/ruby/1.9/webrick/httpserver.rb:138:in service' /home/sidfunktion/.rvm/rubies/jruby-1.7.0/lib/ruby/1.9/webrick/httpserver.rb:94:inrun'
/home/sidfunktion/.rvm/rubies/jruby-1.7.0/lib/ruby/1.9/webrick/httpserver.rb:72:in run' /home/sidfunktion/.rvm/rubies/jruby-1.7.0/lib/ruby/1.9/webrick/server.rb:191:instart_thread'
/home/sidfunktion/.rvm/rubies/jruby-1.7.0/lib/ruby/1.9/webrick/server.rb:181:in `start_thread'

What does private mean?

Private ony for the user you created it?
Private for a list of users the creator add to this wiki site by checkbox user-list?
Private for the roles you have read access for private wiki sites? So this would be just another right layer additionally to standard read rights for wiki sites. How does standard wiki rights influence private wiki site right then?
Can u also upload some screeners.
Tx!

Require support for Redmine v2.3

Hi,

I am using redmine version 2.3 but your plugins support till version 2.2.
So request you to provide support for 2.3 also.

Thanks
Vineet

User can access content of private wiki via full-text search

I create a private wiki for developers group with this content "password AD89798qw"
I login with a developer account
As a developer I clic on forbidden wiki and as expected redmine cannot see anything
As a developer I perform search with this keywork "password"
Redmine show me the title of private page and the following content result "password AD89798qw"

Regards

Unable to see attachments on private wiki

I have admin priveleges, but when I click on private wiki attachnet, I see following:

403 You are not authorized to access this page.

Solution is very simple, right code of visible_with_private_wiki is below
Note project, not @project as parameter of is_private_page_visible?

  def visible_with_private_wiki?(user)
    if self.private and !is_private_page_visible?(project)
      return false
    end
    visible_without_private_wiki?(user)
  end

de locale /utf8-without BOM

de:
private_wiki: TeamWiki
permission_view_private_wiki_pages: TeamWikiseiten anzeigen
permission_manage_private_wiki_pages: TeamWikiseiten verwalten
button_hide_wiki: verbergen
button_reveal_wiki: offenlegen

Security leak: {{include}} macro allows to see private pages

User without permissions to view private wiki page can view page content using {{include}} macro.
For example, from ticket description field.
Name of hidden page user can get in wiki\index because all pages are shown in index list even hidden.

compatibility with 1.4.0?

I have installed this plugin with Redmine 1.4.0 and enabled "manage private wiki pages" in roles and permissions settings. But I am not able to see icon on wiki page to make page private. Can you please check compatibility with above mentioned version? This will be great help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.