Fix broken server_variables js

pull/6827/head
Mark Maglana 14 years ago
parent 3e7a119a6b
commit b37db7fdb2
  1. 2
      app/controllers/rb_application_controller.rb
  2. 2
      app/views/rb_master_backlogs/show.html.erb
  3. 9
      init.rb

@ -11,7 +11,7 @@ class RbApplicationController < ApplicationController
def load_project def load_project
@project = if ['rb_sprints', 'rb_burndown_charts'].include? params[:controller] @project = if ['rb_sprints', 'rb_burndown_charts'].include? params[:controller]
Sprint.find(params[:id]).project Sprint.find(params[:id]).project
elsif ['rb_master_backlogs', 'rb_calendars'].include? params[:controller] elsif ['rb_master_backlogs', 'rb_calendars', 'rb_server_variables'].include? params[:controller]
Project.find(params[:id]) Project.find(params[:id])
elsif params[:project_id] elsif params[:project_id]
Project.find(params[:project_id]) Project.find(params[:project_id])

@ -1,6 +1,6 @@
<%- content_for :header_tags do %> <%- content_for :header_tags do %>
<%= stylesheet_link_tag 'index', 'story', :plugin => 'redmine_backlogs' %> <%= stylesheet_link_tag 'index', 'story', :plugin => 'redmine_backlogs' %>
<script type="text/javascript" src="<%= url_for(:controller => 'rb_server_variables', :action => 'show', :project_id => @project.id) %>"></script> <script type="text/javascript" src="<%= url_for(:controller => 'rb_server_variables', :action => 'show', :id => @project.id, :format => :js) %>"></script>
<%= javascript_include_tag 'board_updater', 'backlogs_updater', 'index_main', 'backlog', 'story', :plugin => 'redmine_backlogs' %> <%= javascript_include_tag 'board_updater', 'backlogs_updater', 'index_main', 'backlog', 'story', :plugin => 'redmine_backlogs' %>
<%- end %> <%- end %>

@ -33,15 +33,14 @@ Redmine::Plugin.register :redmine_backlogs do
project_module :backlogs do project_module :backlogs do
# SYNTAX: permission :name_of_permission, { :controller_name => [:action1, :action2] } # SYNTAX: permission :name_of_permission, { :controller_name => [:action1, :action2] }
permission :get_server_variables, { :rb_server_variables => :show }, :public => true
# Master backlog permissions # Master backlog permissions
permission :view_master_backlog, { permission :view_master_backlog, {
:rb_master_backlogs => :show, :rb_master_backlogs => :show,
:rb_stories => [:index, :show], :rb_stories => [:index, :show],
:rb_calendars => :show, :rb_calendars => :show,
:rb_queries => :show :rb_queries => :show,
:rb_server_variables => :show
} }
# Sprint permissions # Sprint permissions
@ -49,7 +48,7 @@ Redmine::Plugin.register :redmine_backlogs do
:rb_sprints => :show, :rb_sprints => :show,
:rb_tasks => [:index, :show], :rb_tasks => [:index, :show],
:rb_impediments => [:index, :show], :rb_impediments => [:index, :show],
:rb_burndown_charts => :show :rb_server_variables => :show
} }
permission :update_sprints, { permission :update_sprints, {
:rb_sprints => [:edit, :update], :rb_sprints => [:edit, :update],

Loading…
Cancel
Save