Skip to content

Commit

Permalink
Deprecate use of organisation api keys
Browse files Browse the repository at this point in the history
With private repos we can use user's permissions on a repo to easily determine whether they should have read access to the repo. This relationship is a lot more muddy with organisations.

Organisations can own lots of repos but who should have access to those API keys? It's all a bit complicated and frankly not worth the effort. So, it's easier to deprecate organisation API keys.

There are only a very small handful of organisation API keys in use at the moment. So, it's not a big problem really.
  • Loading branch information
mlandauer committed Oct 16, 2022
1 parent 16ae8a5 commit 562eace
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions app/views/documentation/api.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@
- else
%p= button_link_to "sign in with GitHub", user_github_omniauth_authorize_path
- if current_user
.col-sm-3
= f.input :owner_id, collection: current_user.all_owners.map { |o| [o.nickname, o.api_key, { "data-content" => "#{owner_image(o, size: 20, show_tooltip: false)} #{o.nickname}" }] }, include_blank: false, hint: "Choose which api key you want to use", label: false

%h2 Example
%p
To do the API query with the values above
Expand Down Expand Up @@ -143,14 +139,6 @@
update_link_url();
}

function update_api_key() {
api_key = $("#scraper_owner_id").val();
$("#api-key").html(api_key);
$("pre span.unescaped-api-key").html(api_key);
$("pre span.api-key").html(encodeURIComponent(api_key));
update_link_url();
}

function update_format() {
var format = $("#format").val();
$("pre span.format").html(format);
Expand Down Expand Up @@ -206,13 +194,11 @@

update_full_name();
update_query();
update_api_key();
update_format();
update_callback();

$("#scraper-full-name").change(update_full_name).keyup(update_full_name);
$("#query").change(update_query).keyup(update_query);
$("#scraper_owner_id").change(update_api_key);
$("#format").change(update_format);
$("#callback").change(update_callback).keyup(update_callback);
$("#title").change(update_atom_query).keyup(update_atom_query);
Expand Down

0 comments on commit 562eace

Please sign in to comment.