Merge branch 'master' into 349-anonymous_access

This commit is contained in:
Vladimir Sharshov 2012-09-07 00:31:28 +04:00
commit 71e28cf3f3
2 changed files with 3 additions and 3 deletions

View File

@ -9,11 +9,11 @@ class PagesController < ApplicationController
def tour_inside
@entries = case params[:id]
when 'projects'
when 'builds'
%w(repo builds monitoring)
when 'sources'
%w(source history annotation edit)
when 'builds'
when 'projects'
%w(control git tracker)
end
render "pages/tour/tour-inside", :layout => 'tour'

View File

@ -59,7 +59,7 @@ class Ability
can [:read, :archive], Project, :owner_type => 'Group', :owner_id => user.group_ids
can([:read, :membered], Project, read_relations_for('projects')) {|project| local_reader? project}
can(:write, Project) {|project| local_writer? project} # for grack
can([:update, :sections, :manage_collaborators], Project) {|project| local_admin? project}
can([:update, :sections, :manage_collaborators, :autocomplete_maintainers], Project) {|project| local_admin? project}
can(:fork, Project) {|project| can? :read, project}
can(:fork, Project) {|project| project.owner_type == 'Group' and can? :update, project.owner}
can(:destroy, Project) {|project| owner? project}