From b7e97817d7d7af4bef0d23cbb36642f30da76273 Mon Sep 17 00:00:00 2001 From: Michael Lange Date: Fri, 29 Sep 2017 17:40:45 -0700 Subject: [PATCH] Expose the token service in all templates for convenience --- ui/app/initializers/app-token.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ui/app/initializers/app-token.js diff --git a/ui/app/initializers/app-token.js b/ui/app/initializers/app-token.js new file mode 100644 index 000000000..f8b3dcee2 --- /dev/null +++ b/ui/app/initializers/app-token.js @@ -0,0 +1,12 @@ +export function initialize() { + const application = arguments[1] || arguments[0]; + + // Provides the acl token service to all templates + application.inject('controller', 'token', 'service:token'); + application.inject('component', 'token', 'service:token'); +} + +export default { + name: 'app-token', + initialize, +};