RafaelVidaurre / angular-permission

Simple route authorization via roles/permissions
MIT License
1.13k stars 212 forks source link

Permission in state do nothing #410

Closed darkterra closed 7 years ago

darkterra commented 7 years ago

Hi,

I do not understand why permissions do not work, but my code is as explained in the wiki. Anyone with an idea of ​​the mistake I made?

Im using :

This is Working (in view) :

  <span>Congrats! You are logged in.</span>
</div>

This is not Working (in config) :

.state('admin.articles', {
  url         : '/adminArticles',
  templateUrl : '../Partial/Admin/adminArticles.html',
  data        : {
     permissions: {
      only: ['ADMIN_ARTICLE'],
      redirectTo: 'home'
    }
  }
})

Thanks in Advance!

oleg-demkovych commented 7 years ago

try downgrade ui-router to 0.4.2