Collect v1.20.0, Android v9 build number 00WW_5_140, device used Nokia 8 TA-1004
Accessing General settings from Admin settings does not display all General settings submenus if access to them has been revoked from normal users.
When normal user access for all settings has been disabled, only the following submenu items are available in admin mode:
Accessing General settings via the Admin settings should allow access to all the settings in General settings submenus.
Class org.odk.collect.android.preferences.DisabledPreferencesRemover does not seem to take into account whether the user is in admin mode or not.
Class org.odk.collect.android.preferences.GeneralPreferencesFragment handles admin mode correctly for main General settings categories.
@opendatakit-bot claim
I'm working on a slightly diverged Collect fork where this issue is solved by handing the boolean variable indicating admin access down to the submenu fragments. I've added the following lines here:
Bundle bundle = new Bundle();
bundle.putBoolean(INTENT_KEY_ADMIN_MODE, getArguments().getBoolean(INTENT_KEY_ADMIN_MODE));
fragment.setArguments(bundle);
Without this change the submenu fragments are always called without arguments including admin mode by this method call.
Please feel free to use this approach @ajwad-shaikh unless you've already found another solution.
I've found a very similar solution. I'm sending out a PR soon.
Thank you for taking out time to help @jsoppela
I'll be glad if you would review the PR too 馃槃
@lognaturel @shobhitagarwal1612 This is an important issue raised by @jsoppela
Admins were unable to access the restricted settings to normal users. This creates a vulnerability in the workflow. Request you to put this up within the v1.21 milestone.
Would be glad if one of you could take time out to review this PR