Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lib/generators/newshound/install/templates/newshound.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
# Most apps use :current_user (Devise, etc.)
# Default is :current_user
config.current_user_method = :current_user
end

# Advanced: Custom authorization logic
# If the default role-based authorization doesn't fit your needs,
# you can provide a custom authorization block:
#
# Newshound.authorize_with do |controller|
# # Your custom logic here
# # Return true to show the banner, false to hide it
# controller.current_user&.admin?
# end
# Custom authorization logic:
# If the default role-based authorization doesn't fit your needs,
# you can provide a custom authorization block:
#
# config.authorize_with do |controller|
# # Your custom logic here
# # Return true to show the banner, false to hide it
# controller.current_user&.admin?
# end
end
Loading