Skip to content

Commit

Permalink
[webui] Include group check in is_maintainer? method.
Browse files Browse the repository at this point in the history
This is a follow-up on b9ec2cb
  • Loading branch information
saschpe committed Nov 22, 2012
1 parent 5751ea1 commit 2b18259
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/webui/app/models/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ def groups(role = nil)
end

def is_maintainer?(user)
groups("maintainer").each do |group|
return true if user.is_in_group?(group)
end
return user_has_role?(user, 'maintainer')
end

Expand Down
3 changes: 3 additions & 0 deletions src/webui/app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ def groups(role = nil)
end

def is_maintainer?(user)
groups("maintainer").each do |group|
return true if user.is_in_group?(group)
end
return user_has_role?(user, 'maintainer')
end

Expand Down

0 comments on commit 2b18259

Please sign in to comment.