mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-01 17:34:59 +08:00
fixed new user registration
This commit is contained in:
parent
8cd86a50bb
commit
8f24d0d80c
2 changed files with 7 additions and 0 deletions
|
@ -158,6 +158,10 @@ class Users::RegistrationsController < Devise::RegistrationsController
|
|||
organization: @org,
|
||||
role: :admin
|
||||
)
|
||||
|
||||
# set current organization to new user
|
||||
resource.current_organization_id = @org.id
|
||||
resource.save
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -101,10 +101,12 @@
|
|||
</li>
|
||||
|
||||
<!-- Global team switch -->
|
||||
<% if current_user.organizations.length > 1 %>
|
||||
<li class="dropdown" id="team-switch">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span><%= current_organization.name %></span>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
<%= form_for(current_user,
|
||||
url: user_current_organization_path,
|
||||
|
@ -117,6 +119,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<!-- greetings -->
|
||||
<li class="dropdown">
|
||||
|
|
Loading…
Add table
Reference in a new issue