mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Fix get_roles method of User model
Previous implementation was associating resources with all
the roles regardless of user role in the resource. ie:
if user is cfp member of conf1, the method was returning:
{ organizer => conf1,
cfp => conf1,
Info Desk => conf1,
Volunteers Coordinator => conf1
}
This commit is contained in:
parent
3c356cbaaf
commit
7e04a267cb
4 changed files with 19 additions and 6 deletions
|
|
@ -274,7 +274,7 @@ module ApplicationHelper
|
|||
# Outputs the roles of a user, including the conferences for which the user has the roles
|
||||
# Eg. organizer(oSC13, oSC14), cfp(oSC12, oSC13)
|
||||
def show_roles(roles)
|
||||
roles.map { |x| x[0].titleize + ' ' + x[1] }.join ', '
|
||||
roles.map{ |x| x[0].titleize + ' (' + x[1].join(', ') + ')' }.join ', '
|
||||
end
|
||||
|
||||
def can_manage_volunteers(conference)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue