mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-19 05:38:08 +01:00
when CAS is switched app functions as normal but does not use any other auth methods.
This commit is contained in:
parent
00d06b7a00
commit
f259924a85
5 changed files with 31 additions and 17 deletions
|
|
@ -60,9 +60,15 @@
|
|||
<div id="cas_auth_form" style="display:block">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<% if @username %>
|
||||
<td>
|
||||
<% if @username && @user%>
|
||||
<p>Hello, <%= @username %>! You are authenticated.</p>
|
||||
<% elsif @username %>
|
||||
<p>Hello, <%= @username %>! You do not have an account on Tracks.
|
||||
<%if SITE_CONFIG['open_signups']%>
|
||||
If you like to request on please go here to <%= link_to "Request Account" , signup_url %>
|
||||
<%end%>
|
||||
</p>
|
||||
<% else %>
|
||||
<p>You are not yet authenticated. <%= link_to("Login", @login_url) %>
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -8,20 +8,21 @@
|
|||
<h3><%= @heading -%></h3>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="user_login">Desired login:</label></td>
|
||||
<td> <%= text_field "user", "login", :size => 20 %></td>
|
||||
</tr>
|
||||
<%if Tracks::Config.auth_schemes.include?('cas')%>
|
||||
<tr style="display:none">
|
||||
<td><label for="user_password">Choose password:</label></td>
|
||||
<td><%= password_field "user", "password", :size => 20 , :value => "fakebecauseweusecas" %></td>
|
||||
<tr>
|
||||
<td><label for="user_login">With your CAS username:</label></td>
|
||||
<td> "<%= session[:cas_user]%>" </td>
|
||||
</tr>
|
||||
<tr style="display:none">
|
||||
<td><label for="user_password_confirmation">Confirm password:</label></td>
|
||||
<td><%= session[:cas_user]%>" <%= text_field "user", "login", :size => 20, :value => "fakebecauseweusecas" , :readonly => true %> </td>
|
||||
<td><%= password_field "user", "password", :size => 20 , :value => "fakebecauseweusecas" %></td>
|
||||
<td><%= password_field "user", "password_confirmation", :size => 20, :value => "fakebecauseweusecas" %></td>
|
||||
</tr>
|
||||
<%else%>
|
||||
<tr>
|
||||
<td><label for="user_login">Desired login:</label></td>
|
||||
<td> <%= text_field "user", "login", :size => 20 %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="user_password">Choose password:</label></td>
|
||||
<td><%= password_field "user", "password", :size => 20 %></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue