Merge branch 'develop' into ids-on-every-page
This commit is contained in:
5 files changed
+30
-3
No files matched your search
@@ -46,8 +46,17 @@ export default class PasswordAuthenticator extends BaseAuthenticator {
|
||||
async restore(data) {
|
||||
if (!data) return reject();
|
||||
const tokenID = data.id;
|
||||
const token = data.token;
|
||||
const tokenValidationURL = this.buildTokenValidationEndpointURL(tokenID);
|
||||
const response = await fetch(tokenValidationURL, { method: 'get' });
|
||||
const response = await fetch(tokenValidationURL, {
|
||||
method: 'get',
|
||||
headers: {
|
||||
// TODO: this is temporary to get the call working, but generating
|
||||
// the auth header originated in the application authenticator.
|
||||
// It should probably be factored out into a method on the base.
|
||||
'Authorization': `Bearer ${token}`
|
||||
}
|
||||
});
|
||||
// 401 and 404 responses mean the token is invalid, whereas other types of
|
||||
// error responses do not tell us about the validity of the token.
|
||||
switch (response.status) {
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
{{!--
|
||||
Only show the edit toggle button if the toggle is enabled in the first place
|
||||
AND the form is not already in editable mode.
|
||||
|
||||
The cancel button's disabled state depends on the mode. In edit mode,
|
||||
the cancel button is only disabled if the disabled argument is true,
|
||||
otherwise it is disabled based on the computed property this.disabled.
|
||||
--}}
|
||||
{{yield (hash
|
||||
radioGroup=(component 'rose/form/radio/group' disabled=this.disabled)
|
||||
@@ -22,7 +26,7 @@
|
||||
'rose/form/actions'
|
||||
)
|
||||
submitDisabled=this.disabled
|
||||
cancelDisabled=(if @showEditToggle false this.disabled)
|
||||
cancelDisabled=(if @showEditToggle @disabled this.disabled)
|
||||
cancel=this.handleCancel
|
||||
enableEdit=this.enableEdit
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<nav class="rose-header-nav">
|
||||
<nav class="rose-header-nav" aria-label="header-nav">
|
||||
{{yield (hash
|
||||
link=(component 'link-to' class="rose-header-nav-link")
|
||||
dropdown=(component 'rose/dropdown')
|
||||
|
||||
@@ -33,4 +33,12 @@ export default class ScopesScopeRoute extends Route {
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set scope in application controller
|
||||
*/
|
||||
afterModel() {
|
||||
const scope = this.modelFor('scopes.scope');
|
||||
this.controllerFor('application').set('scope', scope);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,12 @@
|
||||
<Rose::Header class="{{if (is-loading) " loading"}}" as |header|>
|
||||
<header.brand @logo="logo-boundary" @text={{app-name}} />
|
||||
{{#if this.session.isAuthenticated}}
|
||||
<header.nav as |nav|>
|
||||
{{#if this.scope.isOrg}}
|
||||
<nav.link @route="scopes.scope" @model={{this.scope}}>{{this.scope.displayName}}</nav.link>
|
||||
{{/if}}
|
||||
</header.nav>
|
||||
|
||||
<header.utilities as |utilities|>
|
||||
<utilities.dropdown
|
||||
@text="user@example.net"
|
||||
|
||||
Reference in new issue
Block a user