summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-02-26 09:22:10 -0500
committerPeter Kozak <spag@golwen.net>2013-02-26 09:22:10 -0500
commiteb0b73618dac66d5f9e1c4127af156886d362315 (patch)
tree0fdaaa0c26ae3365a21f4d02719533151db5e111 /app/models
parent0a976c6b463288df4a9516bbd08f6232a37d427c (diff)
parent36919fb419a40688daa97e36734f579488cb56e2 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ability.rb1
-rw-r--r--app/models/restore_job.rb13
2 files changed, 14 insertions, 0 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index d886d53..690ee76 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -176,6 +176,7 @@ class Ability
#
can :create, GemeinschaftSetup
can :manage, SipDomain
+ can [:create, :new, :show, :index], RestoreJob
end
end
diff --git a/app/models/restore_job.rb b/app/models/restore_job.rb
new file mode 100644
index 0000000..2c2da54
--- /dev/null
+++ b/app/models/restore_job.rb
@@ -0,0 +1,13 @@
+class RestoreJob < ActiveRecord::Base
+ attr_accessible :state, :backup_file
+
+ mount_uploader :backup_file, BackupFileUploader
+
+ def to_s
+ if self.backup_file?
+ File.basename(self.backup_file.to_s)
+ else
+ "RestoreJob ID #{self.id}"
+ end
+ end
+end