enterprise admin device and account lock/unlock actions #204
Merged
Conversation
adeshmukh-ks
approved these changes
Jun 30, 2026
sali-ks
approved these changes
Jun 30, 2026
adeshmukh-ks
reviewed
Jul 2, 2026
| URL_DEVICE_ADMIN_ACTION = 'dm/device_admin_action' | ||
|
|
||
| DEVICE_FEATURE_UNAVAILABLE_MESSAGE = ( | ||
| 'This feature is not available on this server yet. It will be available soon.' |
Contributor
There was a problem hiding this comment.
change this to "not available in production yet", server would cause confusion amongst users
adeshmukh-ks
reviewed
Jul 2, 2026
| enterprise_user_ids: List[int], | ||
| ) -> List[int]: | ||
| """Return enterprise user IDs known to enterprise data; warn when IDs are not found.""" | ||
| assert context.enterprise_data is not None |
Contributor
There was a problem hiding this comment.
don't user assert as it does not give a meaningful message, use base.is_enterprise_admin check which is there in other enterprise commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
device-admin-action, aligned with Commander.lock_admin_user_devices,unlock_admin_user_devices,account_lock_admin_user_devices,account_unlock_admin_user_devices) using the shared_resolve_devicespath (exact name / numeric ID, duplicate and ambiguous-name handling).device-admin-listhelp and SDK error text: replace incorrectei --userswithenterprise-info user.