Allow admin to override multiple submissions setting
Dieser Commit ist enthalten in:
Ursprung
dd706315de
Commit
5784a9db20
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
|
@ -49,7 +49,7 @@ class CustomWizard::Builder
|
|||
end
|
||||
|
||||
def build
|
||||
unless (@wizard.completed? && !@wizard.multiple_submissions) || !@steps || !@wizard.permitted?
|
||||
unless (@wizard.completed? && !@wizard.multiple_submissions && !@wizard.user.admin) || !@steps || !@wizard.permitted?
|
||||
@steps.each do |s|
|
||||
@wizard.append_step(s['id']) do |step|
|
||||
step.title = s['title'] if s['title']
|
||||
|
|
|
@ -71,7 +71,9 @@ end
|
|||
end
|
||||
|
||||
def include_completed?
|
||||
object.completed? && (!object.respond_to?(:multiple_submissions) || !object.multiple_submissions)
|
||||
object.completed? &&
|
||||
(!object.respond_to?(:multiple_submissions) || !object.multiple_submissions) &&
|
||||
!scope.is_admin?
|
||||
end
|
||||
|
||||
def min_trust
|
||||
|
|
Laden …
In neuem Issue referenzieren