Skip to content

Commit

Permalink
Enable usage of the import kill switch
Browse files Browse the repository at this point in the history
* Disables *github* dep authorization which in turn disable importing. When activated use paste to site via Write Script Online or file upload via Upload Script until the dep can be successfully migrated. If authorization is enabled and there's a dep issue a 500 Server error could occur if GH changes something.
* More bookmarks... can't quite tell if it's Fx but the bookmarks are shooting low on auto browser scroll... will try another browser at a future date.
* Some verbiage clarity.

Applies to OpenUserJS#1705
  • Loading branch information
Martii committed Apr 16, 2021
1 parent 5772c72 commit 8045b1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libs/githubClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Strategy.findOne({ name: 'github' }, async function (aErr, aStrat) {
if (aErr)
console.error(aErr);

if (aStrat) {
if (aStrat && process.env.DISABLE_SCRIPT_IMPORT !== 'true') {
// This authentication authorization is currently required to authorize this app
// to have the GitHub authentication callback work when the strategy `id` and `key` is found
// and additional usage of the `id` and `key` elsewhere in the Code
Expand Down
6 changes: 3 additions & 3 deletions views/pages/newScriptPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ <h4 class="list-group-item-heading"><i class="fa fa-fw fa-book"></i> UserScript
Are you new to {{#newJSLibrary}}library {{/newJSLibrary}}{{^newJSLibrary}}user {{/newJSLibrary}} scripting and thought you would just dive right in without reading anything? Well if you change your mind check out some of our documentation by clicking here. Special thanks go out to all of our collaborators for all their dedication and effort.
</p>
</a>
<a href="{{{newScriptEditorPageUrl}}}" class="list-group-item">
<a href="{{{newScriptEditorPageUrl}}}" class="list-group-item" id="write-script-online">
<h4 class="list-group-item-heading"><i class="octicon octicon-fw octicon-pencil"></i> Write Script Online</h4>
<p class="list-group-item-text">
Click here to write a script using the Ace editor</em>.
</p>
</a>
<div class="list-group-item">
<h4 class="list-group-item-heading"><i class="fa fa-fw fa-upload"></i> Upload Script</h4>
<h4 class="list-group-item-heading" id="upload-script"><i class="fa fa-fw fa-upload"></i> Upload Script</h4>
<p class="list-group-item-text">
<form action="{{{uploadNewScriptPageUrl}}}" method="post" enctype="multipart/form-data" class="form-horizontal">
<input type="hidden" name="uploadScript" value="true">
Expand Down Expand Up @@ -352,7 +352,7 @@ <h4>
</div>
<div id="collapse-github-instructions" class="panel-collapse collapse">
<div class="panel-body">
<p>Optionally you may upload the script to the site first. You may also use the link at <a href="#import-script-from-github">Import Script from Github</a> to speed things up as a shortcut.</p>
<p>You may use <a href="#write-script-online">Write Script Online</a> or <a href="#upload-script">Upload Script</a> to the site first to determine if there are any validation issues. When the service is available you may use the link at <a href="#import-script-from-github">Import Script from Github</a> to speed things up as a shortcut.</p>
<ol>
<li>Ensure that you have GitHub as an authentication for this site.</li>
<li>Ensure that you have and use a default <code>master</code> branch.</li>
Expand Down

0 comments on commit 8045b1c

Please sign in to comment.