{"action":"created","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6659","repository_url":"https://api.github.com/repos/OrchardCMS/Orchard","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6659/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6659/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6659/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/6659","id":143596669,"number":6659,"title":"[dev] Taxonomy Term picker in admin","user":{"login":"Skrypt","id":3228637,"avatar_url":"https://avatars.githubusercontent.com/u/3228637?v=3","gravatar_id":"","url":"https://api.github.com/users/Skrypt","html_url":"https://github.com/Skrypt","followers_url":"https://api.github.com/users/Skrypt/followers","following_url":"https://api.github.com/users/Skrypt/following{/other_user}","gists_url":"https://api.github.com/users/Skrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/Skrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skrypt/subscriptions","organizations_url":"https://api.github.com/users/Skrypt/orgs","repos_url":"https://api.github.com/users/Skrypt/repos","events_url":"https://api.github.com/users/Skrypt/events{/privacy}","received_events_url":"https://api.github.com/users/Skrypt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-25T20:59:06Z","updated_at":"2016-03-29T05:06:42Z","closed_at":null,"body":"I'm getting \"can't acces the admin\" with the Taxonomy Term picker in the admin.\r\nit throws an error in TagsController.cs\r\n`\t        if (!_authorizer.Authorize(StandardPermissions.AccessAdminPanel)) {\r\n\t\t        throw new UnauthorizedAccessException(\"Can't access the admin\");\r\n\t        }`"},"comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments/202712075","html_url":"https://github.com/OrchardCMS/Orchard/issues/6659#issuecomment-202712075","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/6659","id":202712075,"user":{"login":"jtkech","id":8586360,"avatar_url":"https://avatars.githubusercontent.com/u/8586360?v=3","gravatar_id":"","url":"https://api.github.com/users/jtkech","html_url":"https://github.com/jtkech","followers_url":"https://api.github.com/users/jtkech/followers","following_url":"https://api.github.com/users/jtkech/following{/other_user}","gists_url":"https://api.github.com/users/jtkech/gists{/gist_id}","starred_url":"https://api.github.com/users/jtkech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtkech/subscriptions","organizations_url":"https://api.github.com/users/jtkech/orgs","repos_url":"https://api.github.com/users/jtkech/repos","events_url":"https://api.github.com/users/jtkech/events{/privacy}","received_events_url":"https://api.github.com/users/jtkech/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T05:06:42Z","updated_at":"2016-03-29T05:06:42Z","body":"It was simpler, `admin-taxonomy-tags.js` uses a relative url (because it depends on a base url) with an absolute virtual path `/api/taxonomies/tags`. It doesn't work if you use a virtual directory as `OrchardLocal` or, i think, if you use a tenant prefix.\r\n\r\nIf in the script i use the full url `http://localhost:30321/OrchardLoca/api/taxonomies/tags`, it works.\r\n\r\nSo, i could fix it by initializing a `baseUrl` variable in the razor view, and using it as an html data attribute. Then, using this data attribute in the script to construct the full url.\r\n\r\nTo initialize the baseUrl i use this:\r\n\r\n    var baseUrl = Url.Content(\"~/\") + WorkContext.Resolve<ShellSettings>().RequestUrlPrefix;\r\n\r\nNote that i could resolve and use the full url by using this:\r\n\r\n    var taxoTagsApiUrl = Url.HttpRouteUrl(\"\", new { area = \"Orchard.Taxonomies\", controller = \"Tags\" });\r\n\r\nbut, here, there is the piority issue between an httproute descriptor (for the ApiController) and another route descriptor in the same module. Here, i need this PR #5823. If i aplly this PR, it works.\r\n\r\nBut, right now, we can use the solution with the baseUrl. I'll do a PR.\r\n\r\nBest."}}