diff --git a/app/routes/organizations/api-client-id.js b/app/routes/organizations/api-client-id.js index 58b40ed2..f49afde9 100644 --- a/app/routes/organizations/api-client-id.js +++ b/app/routes/organizations/api-client-id.js @@ -1,4 +1,12 @@ import Route from '@ember/routing/route'; +import { inject as service } from '@ember/service'; export default class OrganizationsRegisterRoute extends Route { -} \ No newline at end of file + @service('config-service') configService; + + model() { + return { + registrationPaused: this.configService.CLIENT_ID_REGISTRATION_PAUSED, + }; + } +} diff --git a/app/services/config-service.js b/app/services/config-service.js index 81c2f127..96b72a47 100644 --- a/app/services/config-service.js +++ b/app/services/config-service.js @@ -2,5 +2,6 @@ import Service from '@ember/service'; import config from '../config/environment'; export default Service.extend({ - API_URL: config.API_URL + API_URL: config.API_URL, + CLIENT_ID_REGISTRATION_PAUSED: config.CLIENT_ID_REGISTRATION_PAUSED }); \ No newline at end of file diff --git a/app/styles/app.scss b/app/styles/app.scss index 641322e3..5a6c529e 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -212,4 +212,18 @@ $desktop-width: 1024px; #clear-button { background-color:$dark-grey; color:$light-grey !important; +} + +.alert-warning { + color: $black; + + a { + color: $black; + text-decoration: underline; + + &:hover, + &:focus { + color: $black; + } + } } \ No newline at end of file diff --git a/app/templates/organizations/api-client-id.hbs b/app/templates/organizations/api-client-id.hbs index bac7c1b1..1dec6dba 100644 --- a/app/templates/organizations/api-client-id.hbs +++ b/app/templates/organizations/api-client-id.hbs @@ -6,7 +6,9 @@
ROR API users are encouraged to register for a client ID and to include it in the header of API requests. Requests that include a header named client-id with a valid client ID as its value will receive a rate limit of 2,000 requests/5min. API requests that don't include a client ID will receive a rate limit of 50 requests/5min.
-Please complete the form below to register for a ROR API client ID. Your client ID will be sent to the email address you provide.
+ {{#unless this.model.registrationPaused}} +Please complete the form below to register for a ROR API client ID. Your client ID will be sent to the email address you provide.
+ {{/unless}}We've paused new ROR API client ID registrations while we make updates to the service. No rate limits + are currently enforced based on the presence or absence of a client ID, and none will be introduced before + registration is restored, so API usage is not affected by this pause.
++ If you have questions or an urgent request, please contact support@ror.org. + Thanks for your patience! +
+