Fixed Openness Issue
This commit is contained in:
		
							parent
							
								
									eaa87b3dd8
								
							
						
					
					
						commit
						1f3f9831ad
					
				|  | @ -18,7 +18,7 @@ class ApplicationController < ActionController::Base | ||||||
|   helper_attr :site_valid_locales |   helper_attr :site_valid_locales | ||||||
| 
 | 
 | ||||||
|   def check_backend_openness |   def check_backend_openness | ||||||
|     if Site.first.backend_openness_on |     if !Site.first.backend_openness_on | ||||||
|       redirect_to '/users/sign_in'   if not (authenticate_user! and is_member? ) |       redirect_to '/users/sign_in'   if not (authenticate_user! and is_member? ) | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
|  |  | ||||||
|  | @ -130,7 +130,7 @@ class PagesController < ApplicationController | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|   def check_frontend_open |   def check_frontend_open | ||||||
|     if Site.first.frontend_open && current_user.nil?  #Need to be change |     if !Site.first.frontend_open && current_user.nil?  #Need to be change | ||||||
|       redirect_to '/admin/dashboards'   |       redirect_to '/admin/dashboards'   | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
|  |  | ||||||
|  | @ -21,7 +21,7 @@ | ||||||
|   </li> |   </li> | ||||||
| 
 | 
 | ||||||
|   <!-- Desktop --> |   <!-- Desktop --> | ||||||
|   <% if !@site.desktop_closed%> |   <% if @site.desktop_closed%> | ||||||
|   <li id="orbit-desktop"> |   <li id="orbit-desktop"> | ||||||
|     <a href="<%= desktop_path %>" role="button"> |     <a href="<%= desktop_path %>" role="button"> | ||||||
|       <i class="icons-screen"></i> <span class="hide"><%= t(:desktop) %></span> |       <i class="icons-screen"></i> <span class="hide"><%= t(:desktop) %></span> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue