-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from ATIX-AG/fix_multiple_actions
Fix multiple actions
- Loading branch information
Showing
3 changed files
with
20 additions
and
13 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
app/helpers/concerns/foreman_snapshot_management/hosts_helper_extension.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module ForemanSnapshotManagement | ||
module HostsHelper | ||
def snapshot_multiple_actions | ||
return [] unless can_create_snapshots? | ||
[{ action: [_('Create Snapshot'), select_multiple_host_snapshots_path], priority: 1000 }] | ||
end | ||
|
||
private | ||
|
||
def can_create_snapshots? | ||
User.current.can?(:create_snapshots) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters