We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 511a3c5 commit b0c08f5Copy full SHA for b0c08f5
config/initializers/maglev.rb
@@ -37,6 +37,7 @@
37
# Editor UI authentication (https://docs.maglev.dev/guides/setup-authentication)
38
# config.is_authenticated = :editor_allowed? # name of any protected method from your Rails application controller
39
config.is_authenticated = ->(site) do
40
+ return false if !site || !current_user
41
Rails.logger.info "🔐 site##{site.id} owned by user##{site.siteable.user_id} and requested by user##{current_user&.id}"
42
site.siteable.user_id == current_user&.id
43
end
0 commit comments