Skip to content

Commit

Permalink
Added SendOnBehalf Function
Browse files Browse the repository at this point in the history
Added ability to add and remove "send on behalf" permissions from the edit mailbox screen
  • Loading branch information
BNWEIN committed Jul 28, 2023
1 parent 3755e7f commit 4732866
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions src/views/email-exchange/administration/EditMailboxPermissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ const MailboxPermissions = () => {
RemoveFullAccess: values.RemoveFullAccess ? values.RemoveFullAccess : null,
AddSendAs: values.AddSendAs ? values.AddSendAs : null,
RemoveSendAs: values.RemoveSendAs ? values.RemoveSendAs : null,
AddSendOnBehalf: values.AddSendOnBehalf ? values.AddSendOnBehalf : null,
RemoveSendOnBehalf: values.RemoveSendOnBehalf ? values.RemoveSendOnBehalf : null,
}
//window.alert(JSON.stringify(shippedValues))
genericPostRequest({ path: '/api/ExecEditMailboxPermissions', values: shippedValues })
Expand Down Expand Up @@ -250,6 +252,34 @@ const MailboxPermissions = () => {
/>
{usersError && <span>Failed to load list of users</span>}
</CCol>
<CCol md={12}>
<RFFSelectSearch
multi={true}
label="Add Send On Behalf permissions"
disabled={formDisabled}
values={users?.map((user) => ({
value: user.mail,
name: `${user.displayName} - ${user.mail} `,
}))}
placeholder={!usersIsFetching ? 'Select user' : 'Loading...'}
name="AddSendOnBehalf"
/>
{usersError && <span>Failed to load list of users</span>}
</CCol>
<CCol md={12}>
<RFFSelectSearch
multi={true}
label="Remove Send On Behalf permissions"
disabled={formDisabled}
values={users?.map((user) => ({
value: user.mail,
name: `${user.displayName} - ${user.mail} `,
}))}
placeholder={!usersIsFetching ? 'Select user' : 'Loading...'}
name="RemoveSendOnBehalf"
/>
{usersError && <span>Failed to load list of users</span>}
</CCol>
</CRow>
<CRow className="mb-3">
<CCol md={6}>
Expand Down
2 changes: 1 addition & 1 deletion src/views/identity/administration/UserActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function UserActions({ tenantDomain, userId, userEmail, className
onClick: () =>
handleModal(
'Are you sure you want to enable the online archive for this user?',
`/api/ExecEnableArchive?TenantFilter=${tenantDomain}&ID=${userId}`,
`/api/ExecEnableArchive?TenantFilter=${tenantDomain}&ID=${userEmail}`,
),
},
{
Expand Down

0 comments on commit 4732866

Please sign in to comment.