Changes for reviewPermissions: support for "" - empty group.

Used for users without groups.
This commit is contained in:
Julia Radzhabova 2020-09-02 21:03:09 +03:00
parent be2924ef60
commit b7f410def8
2 changed files with 2 additions and 2 deletions

View file

@ -481,7 +481,7 @@ define([
checkUserGroups: function(username) {
var groups = Common.Utils.UserInfoParser.getParsedGroups(username);
return this.currentUserGroups && groups && (_.intersection(this.currentUserGroups, groups).length>0);
return this.currentUserGroups && groups && (_.intersection(this.currentUserGroups, (groups.length>0) ? groups : [""]).length>0);
},
getUserName: function(id){

View file

@ -700,7 +700,7 @@ define([
checkUserGroups: function(username) {
var groups = Common.Utils.UserInfoParser.getParsedGroups(username);
return _currentUserGroups && groups && (_.intersection(_currentUserGroups, groups).length>0);
return _currentUserGroups && groups && (_.intersection(_currentUserGroups, (groups.length>0) ? groups : [""]).length>0);
},
dateToLocaleTimeString: function (date) {