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