@@ -202,9 +213,32 @@ const AttributeMapping = (props) => {
onChange={onChangeValue}
value={userQuotaLimit}
scale
- isDisabled={!isLdapEnabled || isUIDisabled}
+ isDisabled={
+ !isDefaultUsersQuotaSet || !isLdapEnabled || isUIDisabled
+ }
tabIndex={11}
/>
+ {!isDefaultUsersQuotaSet && (
+
+ ,
+ ]}
+ />
+
+ )}
@@ -250,7 +284,7 @@ const AttributeMapping = (props) => {
);
};
-export default inject(({ ldapStore }) => {
+export default inject(({ ldapStore, currentQuotaStore }) => {
const {
setMail,
setFirstName,
@@ -274,6 +308,8 @@ export default inject(({ ldapStore }) => {
userType,
} = requiredSettings;
+ const { isDefaultUsersQuotaSet } = currentQuotaStore;
+
return {
setFirstName,
setSecondName,
@@ -292,5 +328,7 @@ export default inject(({ ldapStore }) => {
errors,
isLdapEnabled,
isUIDisabled,
+
+ isDefaultUsersQuotaSet,
};
})(observer(AttributeMapping));
diff --git a/packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/AuthenticationContainer.js b/packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/AuthenticationContainer.js
index 7466f19375..180b7ff02b 100644
--- a/packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/AuthenticationContainer.js
+++ b/packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/AuthenticationContainer.js
@@ -32,6 +32,7 @@ import { HelpButton } from "@docspace/shared/components/help-button";
import { FieldContainer } from "@docspace/shared/components/field-container";
import { ToggleButton } from "@docspace/shared/components/toggle-button";
import LdapFieldComponent from "./LdapFieldComponent";
+import { InputSize, InputType } from "@docspace/shared/components/text-input";
const LOGIN = "login",
PASSWORD = "password";
@@ -109,6 +110,7 @@ const AuthenticationContainer = ({
isRequired
>
diff --git a/packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/LdapFieldComponent.js b/packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/LdapFieldComponent.js
index 7e09c9a9a6..ccb0ff1dc1 100644
--- a/packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/LdapFieldComponent.js
+++ b/packages/client/src/pages/PortalSettings/categories/integration/LDAP/sub-components/LdapFieldComponent.js
@@ -28,6 +28,7 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { TextInput } from "@docspace/shared/components/text-input";
import { Textarea } from "@docspace/shared/components/textarea";
+import { PasswordInput } from "@docspace/shared/components/password-input";
const LdapFieldComponent = (props) => {
const {
@@ -37,6 +38,7 @@ const LdapFieldComponent = (props) => {
setErrorField,
name,
onChange,
+ isPassword,
...prop
} = props;
@@ -68,6 +70,17 @@ const LdapFieldComponent = (props) => {
if (isTextArea)
return
;
+ if (isPassword)
+ return (
+
+ );
+
return (
{
resetForm,
confirmationResetModal,
isSubmitLoading,
- hasErrors,
- hasChanges,
isLoadingXml,
- enableSso,
isSSOAvailable,
closeResetModal,
confirmReset,
+ isDisabledSaveButton,
} = props;
return (
@@ -62,9 +60,7 @@ const SubmitResetButtons = (props) => {
displaySettings={true}
hasScroll={true}
isSaving={isSubmitLoading}
- saveButtonDisabled={
- !enableSso || hasErrors || !hasChanges || isLoadingXml
- }
+ saveButtonDisabled={isDisabledSaveButton}
disableRestoreToDefault={
isSubmitLoading || isLoadingXml || !isSSOAvailable
}
@@ -90,12 +86,10 @@ export default inject(({ ssoStore, currentQuotaStore }) => {
resetForm,
confirmationResetModal,
isSubmitLoading,
- hasErrors,
- hasChanges,
isLoadingXml,
- enableSso,
closeResetModal,
confirmReset,
+ isDisabledSaveButton,
} = ssoStore;
const { isSSOAvailable } = currentQuotaStore;
@@ -106,12 +100,10 @@ export default inject(({ ssoStore, currentQuotaStore }) => {
resetForm,
confirmationResetModal,
isSubmitLoading,
- hasErrors,
- hasChanges,
isLoadingXml,
- enableSso,
isSSOAvailable,
closeResetModal,
confirmReset,
+ isDisabledSaveButton,
};
})(observer(SubmitResetButtons));
diff --git a/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/styled-containers/StyledSsoPageContainer.js b/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/styled-containers/StyledSsoPageContainer.js
index f37c6e5d73..6222f03346 100644
--- a/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/styled-containers/StyledSsoPageContainer.js
+++ b/packages/client/src/pages/PortalSettings/categories/integration/SingleSignOn/styled-containers/StyledSsoPageContainer.js
@@ -51,16 +51,6 @@ const StyledSsoPage = styled.div`
margin-bottom: 4px;
}
- .field-label {
- display: flex;
- align-items: center;
- height: auto;
- font-weight: 600;
- line-height: 20px;
- overflow: visible;
- white-space: normal;
- }
-
.xml-input {
.field-label-icon {
margin-bottom: 8px;
diff --git a/packages/client/src/store/GroupsStore.ts b/packages/client/src/store/GroupsStore.ts
index 28a14c28b2..ca184a7265 100644
--- a/packages/client/src/store/GroupsStore.ts
+++ b/packages/client/src/store/GroupsStore.ts
@@ -152,6 +152,24 @@ class GroupsStore {
return false;
}
+ get insideGroupIsFiltered() {
+ return (
+ this.insideGroupFilter.activationStatus ||
+ this.insideGroupFilter.employeeStatus ||
+ this.insideGroupFilter.payments ||
+ this.insideGroupFilter.search ||
+ this.insideGroupFilter.role ||
+ this.insideGroupFilter.accountLoginType
+ );
+ }
+
+ get isCurrentGroupEmpty() {
+ return (
+ !this.insideGroupIsFiltered &&
+ this.peopleStore.usersStore.peopleList.length === 0
+ );
+ }
+
// Inside Group Filter
setInsideGroupFilter = (filter) => {
@@ -282,6 +300,7 @@ class GroupsStore {
filter,
updateFilter = false,
withFilterLocalStorage = false,
+ updateCurrentGroup = false,
) => {
this.setInsideGroupLoading(true);
@@ -309,7 +328,7 @@ class GroupsStore {
requests.push(api.people.getUserList(filterData));
- if (groupId !== this.currentGroup?.id) {
+ if (updateCurrentGroup || groupId !== this.currentGroup?.id) {
requests.push(groupsApi.getGroupById(groupId));
}
@@ -329,6 +348,18 @@ class GroupsStore {
return Promise.resolve(filteredMembersRes.items);
};
+ refreshInsideGroup = async () => {
+ if (!this.currentGroup) return;
+
+ await this.fetchGroup(
+ this.currentGroup.id,
+ this.insideGroupFilter,
+ true,
+ false,
+ true,
+ );
+ };
+
get hasMoreInsideGroupUsers() {
return (
this.peopleStore.usersStore.users.length < this.insideGroupFilter.total
@@ -662,10 +693,12 @@ class GroupsStore {
}
if (getIsInsideGroup() && this.currentGroup?.id === groupId) {
+ const filter = this.insideGroupFilter.clone();
+
this.setCurrentGroup(res);
- const members = await api.people.getUserList(
- this.insideGroupFilter.clone(),
- );
+ const members = await api.people.getUserList(filter);
+ filter.total = members.total;
+ this.setInsideGroupFilter(filter);
this.peopleStore.usersStore.setUsers(members.items);
this.setInsideGroupTempTitle(res.name);
}
diff --git a/packages/client/src/store/SsoFormStore.js b/packages/client/src/store/SsoFormStore.js
index 3ba3500ef1..0d31489d6e 100644
--- a/packages/client/src/store/SsoFormStore.js
+++ b/packages/client/src/store/SsoFormStore.js
@@ -946,6 +946,33 @@ class SsoFormStore {
);
}
+ get isDisabledSaveButton() {
+ return (
+ !this.enableSso ||
+ this.hasErrors ||
+ !this.hasChanges ||
+ this.isLoadingXml ||
+ this.isRequiredFieldsEmpty
+ );
+ }
+
+ get isRequiredFieldsEmpty() {
+ return (
+ this.entityId.trim().length === 0 ||
+ (this.ssoBinding === BINDING_POST &&
+ this.ssoUrlPost.trim().length === 0) ||
+ (this.sloBinding === BINDING_POST &&
+ this.sloUrlPost.trim().length === 0) ||
+ (this.ssoBinding === BINDING_REDIRECT &&
+ this.ssoUrlRedirect.trim().length === 0) ||
+ (this.sloBinding === BINDING_REDIRECT &&
+ this.sloUrlRedirect.trim().length === 0) ||
+ this.firstName.trim().length === 0 ||
+ this.lastName.trim().length === 0 ||
+ this.email.trim().length === 0
+ );
+ }
+
scrollToField = () => {
for (let key in this) {
if (key.includes("HasError") && this[key] !== false) {
diff --git a/packages/client/src/store/UsersStore.js b/packages/client/src/store/UsersStore.js
index 6d5bf98f91..fec925f401 100644
--- a/packages/client/src/store/UsersStore.js
+++ b/packages/client/src/store/UsersStore.js
@@ -149,9 +149,14 @@ class UsersStore {
return Promise.resolve(result);
};
- removeUser = async (userId, filter) => {
+ removeUser = async (userId, filter, isInsideGroup) => {
+ const { refreshInsideGroup } = this.peopleStore.groupsStore;
+
await api.people.deleteUsers(userId);
- await this.getUsersList(filter, true);
+
+ isInsideGroup
+ ? await refreshInsideGroup()
+ : await this.getUsersList(filter, true);
};
get needResetUserSelection() {