Skip to content

Support for Disable Send policy#1271

Merged
mpbw2 merged 6 commits intomasterfrom
send-policy
Feb 18, 2021
Merged

Support for Disable Send policy#1271
mpbw2 merged 6 commits intomasterfrom
send-policy

Conversation

@mpbw2
Copy link
Contributor

@mpbw2 mpbw2 commented Feb 18, 2021

Overview

Added support for disabling Send via enterprise policy. Functionality is reduced to read and delete only.

(Note that references to "options button" below is referring to the 3-dot overflow for each item in listviews, not the new expandable options button on the Send Add/Edit page)

Files Changes/Added

Android:

  • SendviewCellRenderer.cs: Support for toggling options button visibility, added missing disabled send icon
  • SendViewCell.axml: Added missing disabled send icon

App:

  • SendviewCell.xaml: Support for toggling options button visibility
  • SendViewCell.xaml.cs: Support for toggling options button visibility
  • SendViewCellViewModel.cs: Support for toggling options button visibility
  • SendGroupingsPage.xaml: Support for toggling options button visibility, warning banner, and FAB visibility for Android
  • SendGroupingsPage.xaml.cs: Added call to init viewmodel and post-load toolbar adjustments
  • SendGroupingsPageViewModel.cs: Added SendEnabled property, set via new init method, and passed into sends list
  • SendGroupingsPageListItem.cs: Added property for options button visibility
  • SendAddEditPage.xaml: Support for disabling save button, warning banner, and bindings to disable editable components when Send is disabled
  • SendAddEditPage.xaml.cs: Moved call to init to async, post-load toolbar adjustments, and adjustments to the "More" overflow menu based on SendEnabled (also tweaked button size for android hack and added missing "Async" suffix to "TypeChanged" method)
  • SendAddEditPageViewModel.cs: Added SendEnabled property, made init method async, added SendEnabled check failsafe to SubmitAsync, use CopySendUrlAsync helper method, added missing Async suffix to ShareSendUrl
  • SendsPage.xaml: Support for toggling options button visibility
  • SendsPageViewModel.cs: Added SendEnabled property
  • AppResources.resx: Added SendLink and SendDisabledWarning text
  • AppResources.Designer.cs: System modified resources
  • AppHelpers.cs: Added IsSendDisabledByPolicyAsync and CopySendUrlAsync helper methods, and added IsSendDisabledByPolicyAsync failsafe checks to ShareSendUrlAsync and RemoveSendPasswordAsync

Core:

  • PolicyType.cs: Added DisableSend policy type

Considerations

  • Warning banner design is based on pattern already established elsewhere (password generator policies come to mind)
  • Some views lack an obvious "disabled" state change and it varies by platform. it's something I hope to improve upon with styling & XF updates

Screenshots

Screen Shot 2021-02-17 at 9 49 06 PM
Screen Shot 2021-02-17 at 9 54 53 PM
Screen Shot 2021-02-17 at 9 55 13 PM

@mpbw2 mpbw2 requested a review from a team February 18, 2021 05:11
@mpbw2 mpbw2 merged commit 3799eb4 into master Feb 18, 2021
@mpbw2 mpbw2 deleted the send-policy branch February 18, 2021 21:58
vvolkgang pushed a commit that referenced this pull request Jun 20, 2024
vvolkgang pushed a commit that referenced this pull request Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants