[DE mobile] Fix review permissions
This commit is contained in:
parent
e576fef9ea
commit
cc3df7db90
|
@ -63,8 +63,7 @@ define([
|
||||||
canViewReview,
|
canViewReview,
|
||||||
arrChangeReview = [],
|
arrChangeReview = [],
|
||||||
dateChange = [],
|
dateChange = [],
|
||||||
_fileKey,
|
_fileKey;
|
||||||
_currentUserGroups;
|
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -115,18 +114,6 @@ define([
|
||||||
if (editor === 'DE') {
|
if (editor === 'DE') {
|
||||||
_fileKey = mode.fileKey;
|
_fileKey = mode.fileKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode && mode.canUseReviewPermissions) {
|
|
||||||
var permissions = mode.customization.reviewPermissions,
|
|
||||||
arr = [],
|
|
||||||
groups = Common.Utils.UserInfoParser.getParsedGroups(Common.Utils.UserInfoParser.getCurrentName());
|
|
||||||
groups && groups.forEach(function(group) {
|
|
||||||
var item = permissions[group.trim()];
|
|
||||||
item && (arr = arr.concat(item));
|
|
||||||
});
|
|
||||||
_currentUserGroups = arr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -725,7 +712,7 @@ define([
|
||||||
|
|
||||||
checkUserGroups: function(username) {
|
checkUserGroups: function(username) {
|
||||||
var groups = Common.Utils.UserInfoParser.getParsedGroups(username);
|
var groups = Common.Utils.UserInfoParser.getParsedGroups(username);
|
||||||
return _currentUserGroups && groups && (_.intersection(_currentUserGroups, (groups.length>0) ? groups : [""]).length>0);
|
return Common.Utils.UserInfoParser.getCurrentGroups() && groups && (_.intersection(Common.Utils.UserInfoParser.getCurrentGroups(), (groups.length>0) ? groups : [""]).length>0);
|
||||||
},
|
},
|
||||||
|
|
||||||
dateToLocaleTimeString: function (date) {
|
dateToLocaleTimeString: function (date) {
|
||||||
|
|
Loading…
Reference in a new issue