lesli 5.0.10 → 5.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/lesli/users/sessions.js +1 -1
- data/app/assets/stylesheets/lesli/users/sessions.css +1 -1
- data/app/views/devise/sessions/new.html.erb +3 -0
- data/app/views/devise/shared/_demo.html.erb +7 -0
- data/config/initializers/lesli.rb +6 -1
- data/db/seed/production/users.rb +7 -0
- data/db/seed/tools.rb +0 -1
- data/lib/lesli/version.rb +2 -2
- data/lib/scss/pages/devise.scss +8 -0
- data/lib/tasks/lesli/db.rake +11 -21
- data/lib/vue/devise/sessions.js +1 -1
- metadata +3 -2
@@ -36,6 +36,9 @@ Building a better future, one line of code at a time.
|
|
36
36
|
|
37
37
|
<%# Log in form %>
|
38
38
|
<form @submit="postLogin" method="post">
|
39
|
+
<% if Lesli.config.demo %>
|
40
|
+
<%= render("devise/shared/demo") %>
|
41
|
+
<% end %>
|
39
42
|
<div class="field mb-4">
|
40
43
|
<label for="user_email" class="label">E-mail address</label>
|
41
44
|
<div class="control has-icons-left has-icons-right">
|
@@ -32,6 +32,11 @@ Building a better future, one line of code at a time.
|
|
32
32
|
|
33
33
|
Lesli.configure do |config|
|
34
34
|
|
35
|
+
|
36
|
+
# Start Lesli as demo
|
37
|
+
config.demo = false
|
38
|
+
|
39
|
+
|
35
40
|
# Installation identifier
|
36
41
|
config.instance = "Lesli"
|
37
42
|
|
@@ -79,7 +84,7 @@ Lesli.configure do |config|
|
|
79
84
|
|
80
85
|
# Instance security settings
|
81
86
|
config.security = {
|
82
|
-
password: "
|
87
|
+
password: "Tardis2024$",
|
83
88
|
enable_debug: false,
|
84
89
|
enable_becoming: false,
|
85
90
|
enable_analytics: true,
|
data/db/seed/production/users.rb
CHANGED
@@ -54,6 +54,13 @@ passadmin = Devise.friendly_token(40)
|
|
54
54
|
passguest = Devise.friendly_token(40)
|
55
55
|
|
56
56
|
|
57
|
+
if Lesli.config.demo
|
58
|
+
passowner = Lesli.config.security.dig(:password)
|
59
|
+
passadmin = passowner
|
60
|
+
passguest = passowner
|
61
|
+
end
|
62
|
+
|
63
|
+
|
57
64
|
# create the owner user for the account,
|
58
65
|
userowner = create_development_user(emailowner, "owner", "Owner", account[:company_name], password:passowner)
|
59
66
|
useradmin = create_development_user(emailadmin, "admin", "Admin", account[:company_name], password:passadmin)
|
data/db/seed/tools.rb
CHANGED
@@ -35,7 +35,6 @@ def create_development_user email, rolename, firstname, lastname, password:nil
|
|
35
35
|
# get password
|
36
36
|
if password.blank?
|
37
37
|
password = Lesli.config.security.dig(:password)
|
38
|
-
password = password + Time.now.year.to_s + "$"
|
39
38
|
end
|
40
39
|
|
41
40
|
account = Lesli::Account.find_by(email: Lesli.config.company.dig(:email))
|
data/lib/lesli/version.rb
CHANGED
data/lib/scss/pages/devise.scss
CHANGED
data/lib/tasks/lesli/db.rake
CHANGED
@@ -61,13 +61,9 @@ namespace :lesli do
|
|
61
61
|
prepare()
|
62
62
|
end
|
63
63
|
|
64
|
-
desc "Prepare the Lesli database"
|
65
|
-
task :prepare => :environment do |task, args|
|
66
|
-
prepare()
|
67
|
-
end
|
68
|
-
|
69
64
|
desc "Migrate, prepare && user the Lesli database"
|
70
65
|
task :deploy => :environment do |task, args|
|
66
|
+
create()
|
71
67
|
migrate()
|
72
68
|
prepare()
|
73
69
|
Lesli::Engine.load_seed
|
@@ -89,20 +85,23 @@ namespace :lesli do
|
|
89
85
|
# Create the Lesli database (development only)
|
90
86
|
def create
|
91
87
|
|
92
|
-
# do not execute this task if we are at production level
|
93
|
-
return if Rails.env.production?
|
94
|
-
|
95
88
|
# print a message to let the users show the action running
|
96
89
|
L2.m("Create the Lesli database (development only)")
|
97
90
|
|
98
91
|
Rake::Task['db:create'].invoke
|
99
92
|
end
|
100
93
|
|
101
|
-
|
102
|
-
def
|
94
|
+
# Migrate the Lesli database
|
95
|
+
def migrate
|
103
96
|
|
104
|
-
#
|
105
|
-
|
97
|
+
# print a message to let the users show the action running
|
98
|
+
L2.m("Migrate the Lesli database")
|
99
|
+
|
100
|
+
Rake::Task['db:migrate'].invoke
|
101
|
+
end
|
102
|
+
|
103
|
+
desc "Seed the Lesli database"
|
104
|
+
def seed
|
106
105
|
|
107
106
|
# print a message to let the users show the action running
|
108
107
|
L2.msg("Seed the Lesli database (development only)")
|
@@ -118,15 +117,6 @@ namespace :lesli do
|
|
118
117
|
LesliLetter::Engine.load_seed if defined?(LesliLetter)
|
119
118
|
end
|
120
119
|
|
121
|
-
# Migrate the Lesli database
|
122
|
-
def migrate
|
123
|
-
|
124
|
-
# print a message to let the users show the action running
|
125
|
-
L2.m("Migrate the Lesli database")
|
126
|
-
|
127
|
-
Rake::Task['db:migrate'].invoke
|
128
|
-
end
|
129
|
-
|
130
120
|
desc "Prepare the Lesli database"
|
131
121
|
def prepare
|
132
122
|
|
data/lib/vue/devise/sessions.js
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lesli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Lesli Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -291,6 +291,7 @@ files:
|
|
291
291
|
- app/views/devise/registrations/edit.html.erb
|
292
292
|
- app/views/devise/registrations/new.html.erb
|
293
293
|
- app/views/devise/sessions/new.html.erb
|
294
|
+
- app/views/devise/shared/_demo.html.erb
|
294
295
|
- app/views/devise/shared/_error_messages.html.erb
|
295
296
|
- app/views/devise/shared/_links.html.erb
|
296
297
|
- app/views/devise/unlocks/new.html.erb
|