-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow event leaders to see the layer group of all participants
- Loading branch information
1 parent
6dd53f6
commit 20365db
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
app/domain/pbs/table_displays/people/layer_group_label_column.rb
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,15 @@ | ||
# Copyright (c) 2023, Pfadibewegung Schweiz. This file is part of | ||
# hitobito_pbs 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_pbs. | ||
|
||
module Pbs::TableDisplays::People | ||
module LayerGroupLabelColumn | ||
protected | ||
|
||
def allowed?(object, attr, original_object, original_attr) | ||
# In events, evaluate the permission on the participation, not on the person | ||
ability.can? required_permission(attr), original_object | ||
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