2020-08-17 14:56:19 -04:00
|
|
|
import Controller from '@ember/controller';
|
|
|
|
|
|
|
|
|
|
export default class ScopesScopeAuthenticateController extends Controller {
|
|
|
|
|
// =attributes
|
|
|
|
|
|
|
|
|
|
/**
|
2020-10-03 12:43:12 -04:00
|
|
|
* Moves the global scope to index 0.
|
2020-08-17 14:56:19 -04:00
|
|
|
* @type {Array}
|
|
|
|
|
*/
|
2020-10-03 12:43:12 -04:00
|
|
|
get sortedScopes() {
|
|
|
|
|
return [
|
|
|
|
|
...this.model.scopes.filter((scope) => scope.id === 'global'),
|
|
|
|
|
...this.model.scopes.filter((scope) => scope.id !== 'global'),
|
2020-11-16 15:08:59 -05:00
|
|
|
];
|
2020-10-03 12:43:12 -04:00
|
|
|
}
|
2020-08-17 14:56:19 -04:00
|
|
|
}
|