Merge branch 'master' of abf.rosalinux.ru:abf/rosa-build

This commit is contained in:
Vokhmin Alexey V 2013-09-15 17:18:46 +04:00
commit 91d78d3af8
3 changed files with 3 additions and 2 deletions

View File

@ -48,6 +48,7 @@ class Ability
end
if user.user?
can :edit, User, :id => user.id
can [:read, :create], Group
can [:update, :manage_members, :members, :add_member, :remove_member, :update_member], Group do |group|
group.actors.exists?(:actor_type => 'User', :actor_id => user.id, :role => 'admin') # or group.owner_id = user.id

View File

@ -17,7 +17,7 @@
%p{:title => user.try(:name)}
- if user
= short_message(user.name, 28)
= link_to image_tag('gears.png'), edit_url if can?(:edit, user)
= link_to image_tag('gears.png'), edit_url if edit_url.present?
.both
- if user
%p.info.first

View File

@ -3,7 +3,7 @@ require 'spec_helper'
shared_examples_for 'group user with project show rights' do
it 'should be able to perform show action' do
get :show, :id => @group
get :show, :uname => @group.uname
response.should render_template(:show)
end
end