Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.

Commit

Permalink
Merge pull request #61 from G5/application-access
Browse files Browse the repository at this point in the history
Auth roles app access
  • Loading branch information
nathanstruhs authored Jan 7, 2020
2 parents 32940e9 + de85a0d commit 5c7ac1e
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 5 deletions.
13 changes: 13 additions & 0 deletions app/assets/javascripts/g5_authenticatable/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require_tree .
34 changes: 34 additions & 0 deletions app/assets/stylesheets/g5_authenticatable/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*/

body {
padding: 50px;
font-family: "Open Sans", sans-serif;
}

.error {
font-size: 24px;
}

.button {
background-color: #68A5C8;
border: none;
border-radius: 5px;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
}
1 change: 0 additions & 1 deletion app/controllers/g5_authenticatable/error_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

module G5Authenticatable
# For handling errors returned by the auth server
class ErrorController < G5Authenticatable::ApplicationController
def auth_error
flash[:error] = 'There was a problem with the Auth Server!'
Expand Down
2 changes: 1 addition & 1 deletion app/views/g5_authenticatable/error/auth_error.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%=link_to "Main App", main_app.root_path%>
<%=link_to 'Return to main app', main_app.root_path, class: 'button' %>
2 changes: 1 addition & 1 deletion app/views/layouts/g5_authenticatable/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<title>G5Authenticatable</title>
<%= stylesheet_link_tag "g5_authenticatable/application", :media => "all" %>
<%= stylesheet_link_tag "g5_authenticatable/application", :media => 'all' %>
<%= javascript_include_tag "g5_authenticatable/application" %>
<%= csrf_meta_tags %>
</head>
Expand Down
1 change: 1 addition & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rails.application.config.assets.precompile += %w( g5_authenticatable/application.css g5_authenticatable/application.js )
2 changes: 1 addition & 1 deletion g5_authenticatable.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_dependency 'devise_g5_authenticatable', '~> 1.0'
spec.add_dependency 'devise_g5_authenticatable', '~> 1.0.3'
spec.add_dependency 'g5_authenticatable_api', '~> 1.0'
spec.add_dependency 'rolify', '~> 5.1.0'
spec.add_dependency 'pundit', '~> 1.0'
Expand Down
2 changes: 1 addition & 1 deletion lib/g5_authenticatable/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module G5Authenticatable
VERSION = '1.1.2'
VERSION = '1.1.4'
end

0 comments on commit 5c7ac1e

Please sign in to comment.