-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browsing without login by setting environment variable
- Enable readonly browsing when DMEMO_ALLOW_ANONYMOUS_TO_READ is set - Hide favorite tables without login user. - Update RSpec for anonymous login
- Loading branch information
Showing
10 changed files
with
74 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
class TopController < ApplicationController | ||
def show | ||
@database_memos = DatabaseMemo.all.includes(:data_source, schema_memos: :table_memos).sort_by(&:display_order) | ||
@favorite_tables = TableMemo.where(id: current_user.favorite_tables.pluck(:table_memo_id)) | ||
if current_user | ||
@favorite_tables = TableMemo.where(id: current_user.favorite_tables.pluck(:table_memo_id)) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
%nav.navbar.navbar-static-top{ role: "navigation" } | ||
.navbar-custom-menu | ||
%ul.nav.navbar-nav | ||
%li | ||
= link_to setting_path do | ||
%i.fa.fa-gear | ||
Setting | ||
%li | ||
= link_to edit_user_path(current_user) do | ||
%i.fa.fa-user | ||
= current_user.name | ||
%li | ||
= link_to logout_path, method: :delete do | ||
%i.fa.fa-sign-out | ||
Sign-out | ||
- if current_user | ||
%li | ||
= link_to setting_path do | ||
%i.fa.fa-gear | ||
Setting | ||
%li | ||
= link_to edit_user_path(current_user) do | ||
%i.fa.fa-user | ||
= current_user.name | ||
%li | ||
= link_to logout_path, method: :delete do | ||
%i.fa.fa-sign-out | ||
Sign-out | ||
- else | ||
%li | ||
= link_to google_oauth2_path(state: request.fullpath) do | ||
%i.fa.fa-sign-in | ||
Sign-in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters