mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Make second user admin
This commit is contained in:
parent
4df9fa0fdb
commit
2e7169ede7
1 changed files with 1 additions and 2 deletions
|
|
@ -114,8 +114,7 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def setup_role
|
||||
self.is_admin = true if User.count == 0
|
||||
roles << Role.where(name: 'Admin') if User.count == 1
|
||||
self.is_admin = true if User.count == 1
|
||||
end
|
||||
|
||||
# Gets the roles of the user, groups them by role.name and returns the resource(s) of each role
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue