stormpath / stormpath-sdk-angularjs

User Management for AngularJS (1.x) applications
http://docs.stormpath.com/angularjs/sdk/
Apache License 2.0
165 stars 58 forks source link

Add support for data.authorities as alternative to sp.authorize.group #190

Closed mraible closed 7 years ago

mraible commented 7 years ago

Currently, we use the following syntax for locking down states when using ui-router:

$stateProvider.state('jhi-health', {
    parent: 'admin',
    url: '/health',
    sp: {
        authorize: {
            group: 'ROLE_ADMIN'
        }
    }

Other projects (e.g. JHipster) use the following syntax:

$stateProvider.state('jhi-health', {
    parent: 'admin',
    url: '/health',
    data: {
        authorities: ['ROLE_ADMIN'],
        pageTitle: 'health.title'
    }

I'm opening this issue to support both formats and help us add support for ui-router 1.0.