Skip to content
Snippets Groups Projects
Unverified Commit a827f4cb authored by Jarek Radosz's avatar Jarek Radosz Committed by GitHub
Browse files

DEV: General cleanup (#69)

parent dbaca5df
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,10 @@ jobs:
- name: Ember template lint
if: ${{ always() }}
run: yarn ember-template-lint assets/javascripts
run: |
if [ 0 -lt $(find assets/javascripts -type f -name "*.hbs" 2> /dev/null | wc -l) ]; then
yarn ember-template-lint assets/javascripts
fi
- name: Rubocop
if: ${{ always() }}
......
auto_generated
gems
.DS_Store
node_modules
GEM
remote: https://rubygems.org/
specs:
ast (2.4.0)
jaro_winkler (1.5.4)
parallel (1.19.1)
parser (2.7.1.2)
ast (~> 2.4.0)
rainbow (3.0.0)
ast (2.4.2)
parallel (1.22.1)
parser (3.1.1.0)
ast (~> 2.4.1)
rainbow (3.1.1)
regexp_parser (2.2.1)
rexml (3.2.5)
rubocop (0.82.0)
jaro_winkler (~> 1.5.1)
rubocop (1.26.1)
parallel (~> 1.10)
parser (>= 2.7.0.1)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.16.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-discourse (2.1.2)
rubocop (>= 0.69.0)
rubocop-rspec (>= 1.39.0)
rubocop-rspec (1.39.0)
rubocop (>= 0.68.1)
ruby-progressbar (1.10.1)
unicode-display_width (1.7.0)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.16.0)
parser (>= 3.1.1.0)
rubocop-discourse (2.5.0)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.9.0)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
unicode-display_width (2.1.0)
PLATFORMS
ruby
......
......@@ -18,4 +18,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
......@@ -7,5 +7,5 @@ en:
admin_js:
admin:
site_settings:
categories:
categories:
saml: SAML
......@@ -16,7 +16,7 @@ en:
saml_request_method: The HTTP method used when directing the user to the Identity Provider
saml_sp_certificate: SAML Service Provider X.509 certficate. Used to sign messages once enabled via the `saml_*_signed` settings"
saml_sp_certificate: SAML Service Provider X.509 certificate. Used to sign messages once enabled via the `saml_*_signed` settings"
saml_sp_private_key: SAML Service Provider X.509 private key. Used to sign messages once enabled via the `saml_*_signed` settings"
saml_authn_requests_signed: Enable Service Provider signatures for AuthNRequest
saml_want_assertions_signed: Enable Service Provider signatures for Assertions
......
......@@ -59,7 +59,7 @@ saml:
saml_sync_groups: false
saml_groups_fullsync: false
saml_groups_attribute: 'memberOf'
saml_groups_attribute: "memberOf"
saml_groups_ldap_leafcn: false
saml_sync_groups_list:
type: list
......@@ -70,7 +70,7 @@ saml:
default: ""
saml_sync_email: false
saml_sync_moderator: false
saml_moderator_attribute: "isModerator"
saml_sync_admin: false
......@@ -78,7 +78,7 @@ saml:
saml_sync_trust_level: false
saml_trust_level_attribute: "trustLevel"
saml_sync_locale: false
saml_locale_attribute: 'locale'
saml_locale_attribute: "locale"
saml_forced_domains:
type: list
......
......@@ -25,7 +25,7 @@ class ::DiscourseSaml::SamlOmniauthStrategy < OmniAuth::Strategies::SAML
env[Rack::RACK_SESSION_OPTIONS][:skip] = true # Do not set any session cookies. They'll override our SameSite ones
# Make browser re-issue the request in a same-site context so we get cookies
# For this particular action, we explicitely **want** cross-site requests to include session cookies
# For this particular action, we explicitly **want** cross-site requests to include session cookies
render_auto_submitted_form(
destination: callback_url,
params: {
......
......@@ -5,6 +5,6 @@
"author": "Discourse",
"license": "MIT",
"devDependencies": {
"eslint-config-discourse": "^1.1.3"
"eslint-config-discourse": "^3.0.0"
}
}
......@@ -5,6 +5,7 @@
# version: 1.0
# author: Discourse Team
# url: https://github.com/discourse/discourse-saml
# transpile_js: true
gem 'macaddr', '1.0.0'
gem 'uuid', '2.3.7'
......@@ -77,7 +78,7 @@ after_initialize do
end
::SessionController.prepend(::DiscourseSaml::SessionControllerExtensions)
# "SAML Forced Dvomains" - Prevent login via other omniauth strategies
# "SAML Forced Domains" - Prevent login via other omniauth strategies
class ::DiscourseSaml::ForcedSamlError < StandardError; end
on(:after_auth) do |authenticator, result|
next if authenticator.name == "saml"
......
window.onload = function() {
window.onload = function () {
document.forms[0].submit();
}
};
......@@ -626,7 +626,7 @@ describe SamlAuthenticator do
expect(SamlAuthenticator.saml_base_url).to eq("http://test.localhost")
end
it "can be overriden by a setting" do
it "can be overridden by a setting" do
SiteSetting.saml_base_url = "https://override.example.com"
expect(SamlAuthenticator.saml_base_url).to eq("https://override.example.com")
end
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment