
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Web interface for MailyHerald - Ruby on Rails email marketing solution.
Both Ruby on Rails 3.2 and 4 are supported.
Simply just run
gem install maily_herald-webui
or put in your Gemfile
gem "maily_herald-webui"
Mount the WebUI in your application:
# config/routes.rb
mount MailyHerald::Webui::Engine => "/maily_webui"
The simplest way to restrict access to the Maily WebUI is to use Rails routing constraints:
# config/routes.rb
mount MailyHerald::Webui::Engine => "/maily_webui", :constraints => MailyAccessConstraint.new
A sample MailyAccessConstraint
implementation might look like this:
class MailyAccessConstraint
def matches?(request)
return false unless request.session[:user_id]
user = User.find request.session[:user_id]
return user && user.admin?
end
end
HTTP Basic auth can be used too:
# config/routes.rb
MailyHerald::Webui::Engine.middleware.use Rack::Auth::Basic do |username, password|
username == ENV["MAILY_USERNAME"] && password == ENV["MAILY_PASSWORD"]
end if Rails.env.production?
mount MailyHerald::Webui::Engine => "/maily_webui"
By default the WebUI displays entities (i.e. your users) using the to_s
method. You can easily overwrite this method in your model to see your user names in the WebUI. Example below:
class User < ActiveRecord::Base
# ...
def to_s
"#{self.firstname} #{self.lastname}"
end
end
For bug reports or feature requests see the issues on Github.
LGPLv3 License. Copyright 2013-2015 Sology. http://www.sology.eu
FAQs
Unknown package
We found that maily_herald-webui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.