Changes for reviewPermissions: support for "" - empty group.
Used for users without groups.
This commit is contained in:
parent
be2924ef60
commit
b7f410def8
|
@ -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){
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue