Comments (2)
base on https://gist.github.com/ivanvanderbyl/4560416
from ember-cli-admin.
now, you can use ember-cli-simple-auth
with admin.
//application.hbs
{{#if session.isAuthenticated}}
{{partial 'admin/index'}}
{{else}}
{{outlet}}
{{/if}}
Main route:
//routes/main.js
import Ember from 'ember';
import BaseAdminRouteMixin from 'ember-cli-admin/mixins/routes/base';
import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin';
BaseAdminRouteMixin.reopen(ApplicationRouteMixin);
var mainRoute = Ember.Route.extend(BaseAdminRouteMixin, {
redirect: function(){
if(!this.get('session.isAuthenticated')){
this.transitionTo('login');
}
}
});
export default mainRoute;
from ember-cli-admin.
Related Issues (20)
- How to make links in table cells which will route to the corresponding belongsTo route? HOT 5
- When updating a record, It seems there is no data being posted to server. HOT 2
- BelongsTo fields are not editable in edit or new route HOT 4
- BelongsTo attempts wrong model in edit route HOT 7
- Nested routes? HOT 12
- Implementing date ranges as filters in sidebar? HOT 6
- Is it possible to disable the "New" breadcrumb action for a specific tableviewcontroller? HOT 1
- Overwriting searchForm does not work for dasherized models HOT 1
- Ability to disable the new button HOT 3
- Blank screen on Resource page HOT 2
- Overwriting a specific edit template throws an error HOT 4
- ember g table-view-resource my-resources throws an error on latest Ember CLI versioning HOT 2
- Uploads with token
- Fix autocomplete
- http://ember-admin.com is down HOT 2
- Broccoli failure: Overwrites styles/app.scss and can't find related temp file HOT 2
- search-form checkbox
- Supported Versions? HOT 1
- Domain is expired HOT 6
- Version update. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-admin.