mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Reafctor client side (EJS) constants
This commit is contained in:
parent
8fb001422a
commit
bde0091a4a
23 changed files with 118 additions and 367 deletions
|
@ -10,10 +10,8 @@
|
|||
// https://documize.com
|
||||
|
||||
import { Promise as EmberPromise } from 'rsvp';
|
||||
|
||||
import { inject as service } from '@ember/service';
|
||||
import Route from '@ember/routing/route';
|
||||
import constants from '../../../utils/constants';
|
||||
|
||||
export default Route.extend({
|
||||
session: service(),
|
||||
|
@ -29,6 +27,8 @@ export default Route.extend({
|
|||
|
||||
beforeModel(transition) {
|
||||
return new EmberPromise((resolve) => {
|
||||
let constants = this.get('constants');
|
||||
|
||||
this.set('mode', is.not.undefined(transition.queryParams.mode) ? transition.queryParams.mode : 'reject');
|
||||
|
||||
if (this.get('mode') === 'reject' || this.get('appMeta.authProvider') !== constants.AuthProvider.Keycloak) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue