Common.Utils.UserInfoParser -> AscCommon.UserInfoParser

This commit is contained in:
ShimaginAndrey 2021-07-01 12:52:01 +03:00
parent e8f1851855
commit a2172f924d
7 changed files with 9 additions and 9 deletions

View file

@ -139,7 +139,7 @@ class ReviewChange extends Component {
if (this.appConfig && this.appConfig.canUseReviewPermissions) { if (this.appConfig && this.appConfig.canUseReviewPermissions) {
const permissions = this.appConfig.customization.reviewPermissions; const permissions = this.appConfig.customization.reviewPermissions;
let arr = []; let arr = [];
const groups = Common.Utils.UserInfoParser.getParsedGroups(Common.Utils.UserInfoParser.getCurrentName()); const groups = AscCommon.UserInfoParser.canEditReview(AscCommon.UserInfoParser.getCurrentName());
groups && groups.forEach(function(group) { groups && groups.forEach(function(group) {
const item = permissions[group.trim()]; const item = permissions[group.trim()];
item && (arr = arr.concat(item)); item && (arr = arr.concat(item));
@ -159,7 +159,7 @@ class ReviewChange extends Component {
return arr; return arr;
} }
checkUserGroups (username) { checkUserGroups (username) {
const groups = Common.Utils.UserInfoParser.getParsedGroups(username); const groups = AscCommon.UserInfoParser.canEditReview(username);
return this.currentUserGroups && groups && (this.intersection(this.currentUserGroups, (groups.length>0) ? groups : [""]).length>0); return this.currentUserGroups && groups && (this.intersection(this.currentUserGroups, (groups.length>0) ? groups : [""]).length>0);
} }
dateToLocaleTimeString (date) { dateToLocaleTimeString (date) {
@ -496,7 +496,7 @@ class ReviewChange extends Component {
change = { change = {
date: arrChangeReview[0].date, date: arrChangeReview[0].date,
user: arrChangeReview[0].user, user: arrChangeReview[0].user,
userName: Common.Utils.String.htmlEncode(Common.Utils.UserInfoParser.getParsedName(arrChangeReview[0].user)), userName: Common.Utils.String.htmlEncode(AscCommon.UserInfoParser.getParsedName(arrChangeReview[0].user)),
color: arrChangeReview[0].userColor.get_hex(), color: arrChangeReview[0].userColor.get_hex(),
text: arrChangeReview[0].changeText, text: arrChangeReview[0].changeText,
initials: this.props.users.getInitials(arrChangeReview[0].user), initials: this.props.users.getInitials(arrChangeReview[0].user),

View file

@ -36,7 +36,7 @@ class ContextMenu extends ContextMenuController {
getUserName(id) { getUserName(id) {
const user = this.props.users.searchUserByCurrentId(id); const user = this.props.users.searchUserByCurrentId(id);
return Common.Utils.UserInfoParser.getParsedName(user.asc_getUserName()); return AscCommon.UserInfoParser.getParsedName(user.asc_getUserName());
} }
componentWillUnmount() { componentWillUnmount() {

View file

@ -54,7 +54,7 @@ class DocumentInfoController extends Component {
let valueModifiedBy = this.docProps.asc_getLastModifiedBy(); let valueModifiedBy = this.docProps.asc_getLastModifiedBy();
if (valueModifiedBy) { if (valueModifiedBy) {
return Common.Utils.UserInfoParser.getParsedName(valueModifiedBy); return AscCommon.UserInfoParser.getParsedName(valueModifiedBy);
} }
} }

View file

@ -33,7 +33,7 @@ class ContextMenu extends ContextMenuController {
getUserName(id) { getUserName(id) {
const user = this.props.users.searchUserByCurrentId(id); const user = this.props.users.searchUserByCurrentId(id);
return Common.Utils.UserInfoParser.getParsedName(user.asc_getUserName()); return AscCommon.UserInfoParser.getParsedName(user.asc_getUserName());
} }
componentWillUnmount() { componentWillUnmount() {

View file

@ -49,7 +49,7 @@ class PresentationInfoController extends Component {
let valueModifiedBy = this.docProps.asc_getLastModifiedBy(); let valueModifiedBy = this.docProps.asc_getLastModifiedBy();
if (valueModifiedBy) { if (valueModifiedBy) {
return Common.Utils.UserInfoParser.getParsedName(valueModifiedBy); return AscCommon.UserInfoParser.getParsedName(valueModifiedBy);
} }
} }

View file

@ -34,7 +34,7 @@ class ContextMenu extends ContextMenuController {
getUserName(id) { getUserName(id) {
const user = this.props.users.searchUserByCurrentId(id); const user = this.props.users.searchUserByCurrentId(id);
return Common.Utils.UserInfoParser.getParsedName(user.asc_getUserName()); return AscCommon.UserInfoParser.getParsedName(user.asc_getUserName());
} }
componentWillUnmount() { componentWillUnmount() {

View file

@ -57,7 +57,7 @@ class SpreadsheetInfoController extends Component {
getModifiedBy() { getModifiedBy() {
let valueModifiedBy = this.docProps.asc_getLastModifiedBy(); let valueModifiedBy = this.docProps.asc_getLastModifiedBy();
if (valueModifiedBy) { if (valueModifiedBy) {
return Common.Utils.UserInfoParser.getParsedName(valueModifiedBy); return AscCommon.UserInfoParser.getParsedName(valueModifiedBy);
} }
return null; return null;
} }