Merge branch 'hotfix/v0.0.3' of github.com:ONLYOFFICE/AppServer into hotfix/v0.0.3

This commit is contained in:
Vladislav Makhov 2020-12-17 11:21:50 +03:00
commit b75316387b
5 changed files with 21 additions and 5 deletions

View File

@ -490,7 +490,11 @@ const convertGroups = (groups) => {
function mapStateToProps(state) {
const currentModuleName = getCurrentProductName(state);
const settings = getSettings(state);
const { groupHeadCaption, groupsCaption, groupCaption } = settings;
const {
groupHeadCaption,
groupsCaption,
groupCaption,
} = settings.customNames;
const { isLoaded } = state.auth;
return {

View File

@ -42,7 +42,12 @@ const i18n = createI18N({
});
const { Consumer } = utils.context;
const { isArrayEqual } = utils.array;
const { getSettings, getIsLoadedSection } = store.auth.selectors;
const {
getSettings,
getIsLoadedSection,
isAdmin,
getCurrentUserId,
} = store.auth.selectors;
const { setIsLoadedSection } = store.auth.actions;
const { resendUserInvites } = api.people;
const { EmployeeStatus } = constants;
@ -383,6 +388,8 @@ class SectionBodyContent extends React.PureComponent {
isMobile,
selectGroup,
isLoading,
isAdmin,
currentUserId,
} = this.props;
const { dialogsVisible, user } = this.state;
@ -408,8 +415,10 @@ class SectionBodyContent extends React.PureComponent {
options,
} = man;
const sectionWidth = context.sectionWidth;
const showContextMenu = options && options.length > 0;
const contextOptionsProps =
options && options.length > 0
(isAdmin && showContextMenu) ||
(showContextMenu && id === currentUserId)
? {
contextOptions: this.getUserContextOptions(options, id),
}
@ -538,6 +547,8 @@ const mapStateToProps = (state) => {
isLoading,
peopleList: getPeopleList(state),
settings: getSettings(state),
isAdmin: isAdmin(state),
currentUserId: getCurrentUserId(state),
};
};

View File

@ -38,6 +38,7 @@ class DateField extends React.Component {
tabIndex={inputTabIndex}
displayType="auto"
calendarHeaderContent={calendarHeaderContent}
minDate={new Date()}
/>
</FieldContainer>
);

View File

@ -1,6 +1,6 @@
{
"name": "asc-web-common",
"version": "1.0.292",
"version": "1.0.293",
"description": "Ascensio System SIA common components and solutions library",
"license": "AGPL-3.0",
"files": [

View File

@ -47,7 +47,7 @@ export const getCurrentUser = (state) => state.auth.user;
export const isAuthenticated = (state) => state.auth.isAuthenticated;
export const getCurrentUserId = (state) => state.auth.user;
export const getCurrentUserId = (state) => state.auth.user.id;
export const getModules = (state) => state.auth.modules;