Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature - Add More MDM #13942

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open

Feature - Add More MDM #13942

wants to merge 49 commits into from

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Nov 4, 2024

  • Tests written, or not not needed

How to Test?

  1. Modify the relevant settings in setup.xml, and ensure the app responds appropriately to the updated conditions.
  2. Verify if conditions. It must behave as expected.
  3. Test both MDM-related variables and legacy variables in combination to confirm compatibility.

Disable Multi Account -- User can't add account. New accounts can’t be added from the Manage Account section.

Screenshot Screenshot

Disable Sharing -- Removes share button from action list

Screenshot Screenshot

Disable More External Site -- Removes external sites from drawer menu

Screenshot

Disable Intro -- Don't launch FirstRunActivity only if user not logged in before

disable_intro.mp4

@alperozturk96 alperozturk96 linked an issue Nov 4, 2024 that may be closed by this pull request
@alperozturk96 alperozturk96 force-pushed the feature/add-more-mdm branch 2 times, most recently from 712d3ca to 0c8642c Compare November 5, 2024 08:45
@nextcloud nextcloud deleted a comment from github-actions bot Nov 5, 2024
@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Nov 5, 2024

MDMConfig.kt -> shareVia Link -> return false, but I can still see it in details:
2024-11-05-151519

Same is true for "shareViaUser"

@tobiasKaminsky
Copy link
Member

sendFilesSupport -> false
but you can still click on "+person" icon on a file in file list to trigger sharing dialog:
2024-11-05-151811

@@ -313,11 +319,12 @@ static class AddAccountViewHolderItem extends RecyclerView.ViewHolder {
* @param accountListAdapterListener {@link Listener}
*/
private void bind(Listener accountListAdapterListener) {
// bind action listener
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tobiasKaminsky In rare cases, context can be null. In that case, onClick of AddAccountViewHolderItem will do nothing. Is it expected behavior?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. But this should be independant from this PR?
So, create a new issue and we can check/discuss.

@tobiasKaminsky
Copy link
Member

Disable clipboard should also hide clipboard icon.
Otherwise user might think it is just broken.

@alperozturk96
Copy link
Collaborator Author

sendFilesSupport -> false but you can still click on "+person" icon on a file in file list to trigger sharing dialog: 2024-11-05-151811

I’ve updated the PR. I believe the correct condition is: if any of the functions—shareViaUser, shareViaLink, or sendFilesSupport—returns false, we should hide the icon, right?

@tobiasKaminsky
Copy link
Member

I’ve updated the PR. I believe the correct condition is: if any of the functions—shareViaUser, shareViaLink, or sendFilesSupport—returns false, we should hide the icon, right?

yes. MDM is to disable sharing/send files/clipboard

So for MDM there is no need to have those 3 functions. But as this is already in place in our code, just combine those for MDM.

@nextcloud nextcloud deleted a comment from github-actions bot Nov 6, 2024
@alperozturk96
Copy link
Collaborator Author

I’ve updated the PR. I believe the correct condition is: if any of the functions—shareViaUser, shareViaLink, or sendFilesSupport—returns false, we should hide the icon, right?

yes. MDM is to disable sharing/send files/clipboard

So for MDM there is no need to have those 3 functions. But as this is already in place in our code, just combine those for MDM.

43dc61f

@tobiasKaminsky
Copy link
Member

image

Still sharing, but "details" as headline?

@tobiasKaminsky
Copy link
Member

Share via link:

  • internal link share still should be shown (as this is not a real share)

sendFilesSupport:

  • still can send it to another app
  • also possible to see "DocumentStorageProvider" in Android's Files app

Rest ✔

Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Copy link

Copy link

Codacy

Lint

TypemasterPR
Warnings5959
Errors33

SpotBugs

CategoryBaseNew
Bad practice6565
Correctness6161
Dodgy code298298
Experimental11
Internationalization77
Malicious code vulnerability11
Multithreaded correctness77
Performance5353
Security1818
Total511511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more MDM cabilities
2 participants