Skip to content

Commit 562eace

Browse files
committed
Deprecate use of organisation api keys
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.
1 parent 16ae8a5 commit 562eace

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

app/views/documentation/api.html.haml

-14
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@
8484
- else
8585
%p= button_link_to "sign in with GitHub", user_github_omniauth_authorize_path
8686
87-
- if current_user
88-
.col-sm-3
89-
= 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
90-
9187
%h2 Example
9288
%p
9389
To do the API query with the values above
@@ -143,14 +139,6 @@
143139
update_link_url();
144140
}
145141

146-
function update_api_key() {
147-
api_key = $("#scraper_owner_id").val();
148-
$("#api-key").html(api_key);
149-
$("pre span.unescaped-api-key").html(api_key);
150-
$("pre span.api-key").html(encodeURIComponent(api_key));
151-
update_link_url();
152-
}
153-
154142
function update_format() {
155143
var format = $("#format").val();
156144
$("pre span.format").html(format);
@@ -206,13 +194,11 @@
206194

207195
update_full_name();
208196
update_query();
209-
update_api_key();
210197
update_format();
211198
update_callback();
212199

213200
$("#scraper-full-name").change(update_full_name).keyup(update_full_name);
214201
$("#query").change(update_query).keyup(update_query);
215-
$("#scraper_owner_id").change(update_api_key);
216202
$("#format").change(update_format);
217203
$("#callback").change(update_callback).keyup(update_callback);
218204
$("#title").change(update_atom_query).keyup(update_atom_query);

0 commit comments

Comments
 (0)