Sha256: 7485256ed6ac23525c27776e9b1828119e2b6b3538119c077bfb93d0ee2df30e
Contents?: true
Size: 631 Bytes
Versions: 4
Compression:
Stored size: 631 Bytes
Contents
module LunarShell module Satellites class SuController < LunarShell::SatellitesController def run render 'no_username' and return unless provided_username end def create if !log_in!(su_params[:username]). try(:authenticate, su_params[:password]) log_out! @error_message = 'Sorry' end end private def provided_username @provided_username ||= parameters.try(:first) end helper_method :provided_username def su_params params.require(:user).permit(:password, :username) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems