|
|
|
@ -34,7 +34,7 @@ module OpenProject::GlobalRoles::Patches |
|
|
|
|
create_global_role |
|
|
|
|
else |
|
|
|
|
#we have to duplicate unpatched behaviour here in order to set the parameters for the overwritten views |
|
|
|
|
@role = Role.new(params[:role] || { :permissions => Role.non_member.permissions }) |
|
|
|
|
@role = Role.new(permitted_params.role? || { :permissions => Role.non_member.permissions }) |
|
|
|
|
@member_permissions = (@role.setable_permissions || @permissions) |
|
|
|
|
@global_permissions = GlobalRole.setable_permissions |
|
|
|
|
create_without_global_roles |
|
|
|
@ -44,7 +44,7 @@ module OpenProject::GlobalRoles::Patches |
|
|
|
|
private |
|
|
|
|
|
|
|
|
|
def create_global_role |
|
|
|
|
@role = GlobalRole.new params[:role] |
|
|
|
|
@role = GlobalRole.new permitted_params.role |
|
|
|
|
if @role.save |
|
|
|
|
flash[:notice] = l(:notice_successful_create) |
|
|
|
|
redirect_to :action => 'index' |
|
|
|
|