caboose-cms 0.5.186 → 0.5.187
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/caboose/sites_controller.rb +8 -11
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjZkZTQxZjA1MDMyYjdjY2Y1MGVjYjU2ZGY5ZjdjNjM4ODAxZWZjOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MzkzOWYyOWEwMmRlNzRhOTJiMDU1MDg2ODZjZmM4ZTAwYzY0OGI3Zg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmVhNThmZDcxYTE3NTFkNGMxOTE0NTNlYmRhZWM1YTJlZWI2ZTQ5OTBhYTUw
|
10
|
+
MTlkY2M4MWUwNGJiNzFlNzc4MzdlM2MwMDM0Zjk5YWNlMGMwNDQyYjIyZTM4
|
11
|
+
YWUxMDA0Yzk3NjQ1ZDAyZWJlOGQ3YTYyODQwOWVlN2JjODEyM2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTAwNGJmZTI2N2U5ZWIxYjk4ZjlkYmRjN2I0MTAyYzU4YjkyMjZkYTU2YmNi
|
14
|
+
YTIzMmFjYmNlOGNiYTE3YWY4NDZiMjBjOWQ3ZjVjYjc2Y2IyMzc4OThlYzkx
|
15
|
+
ZTk1YmEyNTI2ZmIxZjc2NDE5M2MwOTZlMDYwZGU2YjMzMTI2NWM=
|
@@ -51,14 +51,13 @@ module Caboose
|
|
51
51
|
|
52
52
|
# Create an admin user for the account
|
53
53
|
if !User.where(:username => 'admin', :site_id => @site.id).exists?
|
54
|
-
admin_user = User.create(:username => 'admin', :site_id => @site.id, :password => Digest::SHA1.hexdigest(Caboose::salt + 'caboose'))
|
55
|
-
admin_role = Role.where(:name => 'Admin').first
|
56
|
-
if admin_role
|
57
|
-
RoleMembership.create(:user_id => admin_user.id, :role_id => admin_role.id)
|
58
|
-
else
|
59
|
-
Caboose.log("Error: no admin role exists.")
|
54
|
+
admin_user = User.create(:username => 'admin', :email => 'admin@nine.is', :site_id => @site.id, :password => Digest::SHA1.hexdigest(Caboose::salt + 'caboose'))
|
55
|
+
admin_role = Role.where(:name => 'Admin').first
|
56
|
+
if admin_user && admin_role
|
57
|
+
RoleMembership.create(:user_id => admin_user.id, :role_id => admin_role.id)
|
60
58
|
end
|
61
59
|
end
|
60
|
+
|
62
61
|
end
|
63
62
|
|
64
63
|
# GET /admin/sites/:id/block-types
|
@@ -101,13 +100,11 @@ module Caboose
|
|
101
100
|
end
|
102
101
|
|
103
102
|
# Create an admin user for the account
|
104
|
-
if !User.where(:username => 'admin', :site_id => site.id).exists?
|
105
|
-
admin_user = User.create(:username => 'admin', :site_id => site.id, :password => Digest::SHA1.hexdigest(Caboose::salt + 'caboose'))
|
103
|
+
if !User.where(:username => 'admin', :site_id => site.id).exists?
|
104
|
+
admin_user = User.create(:username => 'admin', :email => 'admin@nine.is', :site_id => site.id, :password => Digest::SHA1.hexdigest(Caboose::salt + 'caboose'))
|
106
105
|
admin_role = Role.where(:name => 'Admin').first
|
107
106
|
if admin_role
|
108
|
-
RoleMembership.create(:user_id => admin_user.id, :role_id => admin_role.id)
|
109
|
-
else
|
110
|
-
Caboose.log("Error: no admin role exists.")
|
107
|
+
RoleMembership.create(:user_id => admin_user.id, :role_id => admin_role.id)
|
111
108
|
end
|
112
109
|
end
|
113
110
|
|
data/lib/caboose/version.rb
CHANGED