Create a new user on the remote (and pull it) .. note:: This function is only available to accounts with admin status on the Remote :param username: User username :param email: User email :param is_active: If the user is enabled :param password: User password :param group_ids: List
(self, username: str, email: str, is_active: bool, password: str, group_ids: List[int], user_permission_ids: List[int])
| 686 | raise RuntimeError(util._last_error()) |
| 687 | |
| 688 | def create_user(self, username: str, email: str, is_active: bool, password: str, group_ids: List[int], user_permission_ids: List[int]) -> 'user.User': |
| 689 | """ |
| 690 | Create a new user on the remote (and pull it) |
| 691 | |
| 692 | .. note:: This function is only available to accounts with admin status on the Remote |
| 693 | |
| 694 | :param username: User username |
| 695 | :param email: User email |
| 696 | :param is_active: If the user is enabled |
| 697 | :param password: User password |
| 698 | :param group_ids: List of group ids for the user |
| 699 | :param user_permission_ids: List of permission ids for the user |
| 700 | :return: Reference to the created user |
| 701 | :raises: RuntimeError if there was an error |
| 702 | """ |
| 703 | group_ids_array = (ctypes.c_uint64 * len(group_ids))() |
| 704 | for i in range(len(group_ids)): |
| 705 | group_ids_array[i] = group_ids[i] |
| 706 | |
| 707 | user_permission_ids_array = (ctypes.c_uint64 * len(group_ids))() |
| 708 | for i in range(len(user_permission_ids)): |
| 709 | user_permission_ids_array[i] = user_permission_ids[i] |
| 710 | |
| 711 | value = core.BNRemoteCreateUser(self._handle, username, email, is_active, password, group_ids_array, len(group_ids), user_permission_ids_array, len(user_permission_ids)) |
| 712 | if value is None: |
| 713 | raise RuntimeError(util._last_error()) |
| 714 | return user.User(value) |
| 715 | |
| 716 | def push_user(self, user: 'user.User', extra_fields: Optional[Dict[str, str]] = None): |
| 717 | """ |