{"action":"created","issue":{"url":"https://api.github.com/repos/Narzerus/angular-permission/issues/395","repository_url":"https://api.github.com/repos/Narzerus/angular-permission","labels_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/395/labels{/name}","comments_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/395/comments","events_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/395/events","html_url":"https://github.com/Narzerus/angular-permission/issues/395","id":215935406,"number":395,"title":"Callback methods not called","user":{"login":"LucaPrete","id":2330576,"avatar_url":"https://avatars0.githubusercontent.com/u/2330576?v=3","gravatar_id":"","url":"https://api.github.com/users/LucaPrete","html_url":"https://github.com/LucaPrete","followers_url":"https://api.github.com/users/LucaPrete/followers","following_url":"https://api.github.com/users/LucaPrete/following{/other_user}","gists_url":"https://api.github.com/users/LucaPrete/gists{/gist_id}","starred_url":"https://api.github.com/users/LucaPrete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucaPrete/subscriptions","organizations_url":"https://api.github.com/users/LucaPrete/orgs","repos_url":"https://api.github.com/users/LucaPrete/repos","events_url":"https://api.github.com/users/LucaPrete/events{/privacy}","received_events_url":"https://api.github.com/users/LucaPrete/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-03-22T02:32:55Z","updated_at":"2017-03-25T20:12:24Z","closed_at":null,"body":"Hello,\r\n\r\nI'm trying to use ng-permission for my project. I use Angular 1.6 and ui.router\r\n\r\nMy code is the following:\r\n* IN index.js\r\nangular\r\n  .module('app', ['lodash', 'ngCookies', 'ngFileUpload', 'ngResource', 'ui.bootstrap', 'ui.router', 'permission', 'permission.ui'])\r\n  .constant('apiPrefix', '/api')\r\n  .run(function ($cookies, $state, Auth, PermPermissionStore) {\r\n    PermPermissionStore\r\n      .definePermission('seeHostView', function () {\r\n        return false;\r\n      });\r\n....\r\n\r\n* IN routes.js\r\n....\r\n$stateProvider\r\n.state('app.host', {\r\n      url: 'host',\r\n      component: 'host',\r\n      data: {\r\n        permissions: {\r\n          only: seeHostView,\r\n          redirectTo: 'login'\r\n        }\r\n      }\r\n    })\r\n....\r\n\r\nWhen I try to go to /host, the page is displayed and I never get re-routed to the login page.\r\nI've also tried to put a 'debugger' inside PermPermissionStore.definePermission(..){}, but the code seems really to never be run.\r\n\r\nAny idea?\r\n\r\nThanks\r\n\r\n-Luca"},"comment":{"url":"https://api.github.com/repos/Narzerus/angular-permission/issues/comments/289236493","html_url":"https://github.com/Narzerus/angular-permission/issues/395#issuecomment-289236493","issue_url":"https://api.github.com/repos/Narzerus/angular-permission/issues/395","id":289236493,"user":{"login":"LucaPrete","id":2330576,"avatar_url":"https://avatars0.githubusercontent.com/u/2330576?v=3","gravatar_id":"","url":"https://api.github.com/users/LucaPrete","html_url":"https://github.com/LucaPrete","followers_url":"https://api.github.com/users/LucaPrete/followers","following_url":"https://api.github.com/users/LucaPrete/following{/other_user}","gists_url":"https://api.github.com/users/LucaPrete/gists{/gist_id}","starred_url":"https://api.github.com/users/LucaPrete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucaPrete/subscriptions","organizations_url":"https://api.github.com/users/LucaPrete/orgs","repos_url":"https://api.github.com/users/LucaPrete/repos","events_url":"https://api.github.com/users/LucaPrete/events{/privacy}","received_events_url":"https://api.github.com/users/LucaPrete/received_events","type":"User","site_admin":false},"created_at":"2017-03-25T20:12:24Z","updated_at":"2017-03-25T20:12:24Z","body":"Well,\n\nReally thanks for the help then ;)\n\n-Luca\n\n2017-03-24 15:52 GMT-07:00 Oleg Demkovych <notifications@github.com>:\n\n> Sorry, i'm not contributor. Just had many issues with this module\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/Narzerus/angular-permission/issues/395#issuecomment-289161811>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ACOP0LztuOjZFW25WzwHks1S21whohNjks5rpEkxgaJpZM4Mkps0>\n> .\n>\n"}}
{"actor":{"display_login":"LucaPrete"}}