mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Introduces New Installation Page
If there are no users signed up and no conferences we show a page informing people what they need to do.
This commit is contained in:
parent
7fd7090867
commit
0f5181ccf4
3 changed files with 29 additions and 4 deletions
|
|
@ -265,12 +265,14 @@ class User < ApplicationRecord
|
|||
proposals(conference).count
|
||||
end
|
||||
|
||||
def self.empty?
|
||||
User.count == 1 && User.first.email == 'deleted@localhost.osem'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def setup_role
|
||||
if User.count == 1 && User.first.email == 'deleted@localhost.osem'
|
||||
self.is_admin = true
|
||||
end
|
||||
self.is_admin = true if User.empty?
|
||||
end
|
||||
|
||||
def touch_events
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue