Merge branch 'master' of abf.rosalinux.ru:abf/rosa-build
This commit is contained in:
commit
91d78d3af8
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue