132 lines
6.4 KiB
Plaintext
132 lines
6.4 KiB
Plaintext
|
<% content_for :settings_body do %>
|
||
|
<div class="FormAccount-container">
|
||
|
<% if @ldap_configuration %>
|
||
|
<%= render :partial => 'admin/organizations/ldap_configuration' %>
|
||
|
<% else %>
|
||
|
<%= form_for @organization, url: CartoDB.url(self, 'organization_auth_update', user: current_user), multipart: true do |f| %>
|
||
|
<%= csrf_meta_tags %>
|
||
|
|
||
|
<div class="FormAccount-row">
|
||
|
<div class="FormAccount-rowLabel">
|
||
|
<label class="CDB-Text CDB-Size-medium is-semibold u-mainTextColor">Whitelisted email domains</label>
|
||
|
</div>
|
||
|
<div class="FormAccount-rowData">
|
||
|
<div class="FormAccount-tags js-domains">
|
||
|
<ul class="CDB-Text CDB-Size-medium FormAccount-tagsList js-domainsList">
|
||
|
<span class= "CDB-Text CDB-Size-small u-altTextColor FormAccount-tagsList--placeholder js-placeholder">Only valid domains, wildcard (*) accepted (ex. *.carto.com)</span>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<%= f.hidden_field :whitelisted_email_domains, :value => "#{ @organization[:whitelisted_email_domains].join(',') if !@organization[:whitelisted_email_domains].blank? }", :class => "js-whitelist CDB-InputText CDB-Text", :placeholder => "Only valid domains, wildcard (*) accepted (ex. *.carto.com)" %>
|
||
|
<div class="u-flex u-lSpace--xl">
|
||
|
<% if @organization.errors[:whitelisted_email_domains].present? %>
|
||
|
<p class="CDB-Text FormAccount-rowInfoText FormAccount-rowInfoText--error u-tSpace"><%= @organization.errors[:whitelisted_email_domains].first%></p>
|
||
|
<% end %>
|
||
|
<p class="CDB-Text CDB-Size-small u-altTextColor">If empty, your organization's sign-up page will be disabled</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="FormAccount-row">
|
||
|
<div class="FormAccount-rowLabel">
|
||
|
<label class="CDB-Text CDB-Size-medium is-semibold u-mainTextColor">Username / password</label>
|
||
|
</div>
|
||
|
<div class="FormAccount-rowData">
|
||
|
<div class="Toggler">
|
||
|
<%= f.check_box :auth_username_password_enabled, :id => "auth_username_password_enabled" %>
|
||
|
<%= label_tag(:auth_username_password_enabled, '') %>
|
||
|
</div>
|
||
|
<div class="u-flex u-lSpace--xl">
|
||
|
<p class="CDB-Text CDB-Size-small u-altTextColor">Allow users to signup with their own username & email submission</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="FormAccount-row">
|
||
|
<div class="FormAccount-rowLabel">
|
||
|
<label class="CDB-Text CDB-Size-medium is-semibold u-mainTextColor">Google Apps Login</label>
|
||
|
</div>
|
||
|
<div class="FormAccount-rowData">
|
||
|
<div class="Toggler">
|
||
|
<%= f.check_box :auth_google_enabled, :id => "auth_google_enabled" %>
|
||
|
<%= label_tag(:auth_google_enabled, '') %>
|
||
|
</div>
|
||
|
<div class="u-flex u-lSpace--xl">
|
||
|
<p class="CDB-Text CDB-Size-small u-altTextColor">Allow users to signup with their own Google domain account</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="FormAccount-row">
|
||
|
<div class="FormAccount-rowLabel">
|
||
|
<label class="CDB-Text CDB-Size-medium is-semibold u-mainTextColor">GitHub Login</label>
|
||
|
</div>
|
||
|
<div class="FormAccount-rowData">
|
||
|
<div class="Toggler">
|
||
|
<%= f.check_box :auth_github_enabled, :id => "auth_github_enabled" %>
|
||
|
<%= label_tag(:auth_github_enabled, '') %>
|
||
|
</div>
|
||
|
<div class="u-flex u-lSpace--xl">
|
||
|
<p class="CDB-Text CDB-Size-small u-altTextColor">Allow users to signup with their own GitHub account</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="FormAccount-row">
|
||
|
<div class="FormAccount-rowLabel">
|
||
|
<label class="CDB-Text CDB-Size-medium is-semibold u-mainTextColor">Strong Passwords</label>
|
||
|
</div>
|
||
|
<div class="FormAccount-rowData">
|
||
|
<div class="Toggler">
|
||
|
<%= f.check_box :strong_passwords_enabled, :id => "strong_passwords_enabled" %>
|
||
|
<%= label_tag(:strong_passwords_enabled, '') %>
|
||
|
</div>
|
||
|
<div class="u-flex u-lSpace--xl">
|
||
|
<p class="CDB-Text CDB-Size-small u-altTextColor">Passwords must contain 8 characters, and require a combination of letters, numbers, and/or special characters.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="FormAccount-row">
|
||
|
<div class="FormAccount-rowLabel">
|
||
|
<label class="CDB-Text CDB-Size-medium is-semibold u-mainTextColor">Password Expiration</label>
|
||
|
</div>
|
||
|
|
||
|
<div class="FormAccount-rowData">
|
||
|
<div class="FormAccount-inputSuffix">
|
||
|
<%= f.text_field :password_expiration_in_d,
|
||
|
:type => "number",
|
||
|
:class => "CDB-InputText CDB-Text FormAccount-input FormAccount-input--number",
|
||
|
:placeholder => "#{@organization.default_password_expiration_in_d || 180}", :min => 1, :max => 365,
|
||
|
:value => "#{@organization.password_expiration_in_d}",
|
||
|
:disabled => @organization.password_expiration_in_d ? false : true %>
|
||
|
<label class="CDB-Text CDB-Size-small u-altTextColor">days</label>
|
||
|
</div>
|
||
|
|
||
|
<div class="CDB-Legend u-upperCase CDB-Text is-semibold CDB-Size-small u-lSpace--xxl">
|
||
|
<div class="u-flex u-alignCenter">
|
||
|
<div class="u-iBlock u-rSpace--m">
|
||
|
<input class="CDB-Checkbox js-input"
|
||
|
type="checkbox"
|
||
|
id="unlimited_password_expiration"
|
||
|
<%= !@organization.password_expiration_in_d ? 'checked' : '' %> />
|
||
|
<span class="u-iBlock CDB-Checkbox-face"></span>
|
||
|
</div>
|
||
|
<label for="unlimited_password_expiration">Unlimited</label>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="FormAccount-footer">
|
||
|
<p class="FormAccount-footerText"></p>
|
||
|
<button type="submit" class="CDB-Button CDB-Button--primary js-save">
|
||
|
<span class="CDB-Button-Text CDB-Text is-semibold CDB-Size-small u-upperCase">Save changes</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
|
||
|
<%= render template: 'admin/organizations/_organization_settings', locals: { title: 'auth settings' } %>
|