mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-27 01:29:17 +01:00
Merge pull request #1100 from mleanos/bugfix/ClientRoutes-Guest-Access
fix(core): Client routes guest access bug
This commit is contained in:
@@ -19,7 +19,7 @@ angular.module(ApplicationConfiguration.applicationModuleName).run(function ($ro
|
||||
if (toState.data && toState.data.roles && toState.data.roles.length > 0) {
|
||||
var allowed = false;
|
||||
toState.data.roles.forEach(function (role) {
|
||||
if (Authentication.user.roles !== undefined && Authentication.user.roles.indexOf(role) !== -1) {
|
||||
if ((role === 'guest') || (Authentication.user && Authentication.user.roles !== undefined && Authentication.user.roles.indexOf(role) !== -1)) {
|
||||
allowed = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user