forked from hitobito/hitobito_cevi
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #101 from hitobito/feature/cevi_82_button_visibili…
…ties Feature/cevi 82 button visibilities
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
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,21 @@ | ||
# frozen_string_literal: true | ||
|
||
# Copyright (c) 2023, CEVI Regionalverband ZH-SH-GL. This file is part of | ||
# hitobito_cevi and licensed under the Affero General Public License version 3 | ||
# or later. See the COPYING file at the top-level directory or at | ||
# https://github.com/hitobito/hitobito_cevi. | ||
|
||
module Cevi::Event::ApplicationAbility | ||
extend ActiveSupport::Concern | ||
|
||
included do | ||
on(Event::Application) do | ||
permission(:any).may(:approve).if_manage_attendances_in_event | ||
end | ||
end | ||
|
||
def if_manage_attendances_in_event | ||
permission_in_event?(:manage_attendances) | ||
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
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