summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/ability.rb5
-rw-r--r--app/views/layouts/_navbar.html.haml4
2 files changed, 8 insertions, 1 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 2e270da..23af525 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -90,6 +90,11 @@ class Ability
# SIM cards
#
cannot [:edit, :update], SimCard
+
+ # Restore is only possible on a new system.
+ #
+ cannot :manage, RestoreJob
+
else
# Any user can do the following stuff.
#
diff --git a/app/views/layouts/_navbar.html.haml b/app/views/layouts/_navbar.html.haml
index a7f47cf..8004c0e 100644
--- a/app/views/layouts/_navbar.html.haml
+++ b/app/views/layouts/_navbar.html.haml
@@ -3,10 +3,12 @@
.container
%span.hidden-phone
%a.brand{:href => (current_user.nil? ? '/' : tenant_path(current_user.current_tenant))}
- Gemeinschaft 5
+ Gemeinschaft 5.1
.nav-collapse.collapse
%ul.nav
+ - if !GemeinschaftSetup.any?
+ %li=link_to t('restore_jobs.new.page_title'), new_restore_job_path
- if current_user && GemeinschaftSetup.any? && current_user.admin?
- if current_page?(page_help_path)
%li.active