services.user package — Platform V1.0 documentation

Platform V1.0 documentation

# services.user package

## Submodules

## services.user.user module

class `services.user.user.` `UserService`

  Bases: `system.app.App`

  Support all user operations.

      >>> from nameko.standalone.rpc import ClusterRpcProxy
      >>> CONFIG = {"AMQP_URI":"amqp://guest:guest@localhost"}
      >>> with ClusterRpcProxy(CONFIG) as services:
      >>>     result = services.user_service.add_user(conn_id='10',
      >>>              user_name='', mail_address="x@y", role='')

  `add_user`(conn_id, user_name, mail_address, role, name=None, cell_phone='', company='', all_kiosks=0, alert_same_kiosk=0, alert_all_kiosk=0)

    Add a user.

  `delete_user`(email)

    Delete user

  `delete_user_by_conn_id`(conn_id)

    Delete user

  `get_client_user_list_count`(conn_id, search_key=None, role=None, state=None)

    Get user list count

  `get_user_info_by_email`(email)

    return user info by email

  `get_user_role_msg`(email)

    Get user’s role

  `get_users`(conn_id, current_user_role=None, search_key=None, sort_key=None, sort_order=None, limit=None, offset=None)

    get the users by conn ID

  `get_users_count`(conn_id, current_user_role=None, search_key=None)

    get the users by conn ID

  `name` = 'user_service'
  `reactivate_user`(user_email)

    Reactivate user

  `save_user_role_msg`(email, roles)

    Save user’s role

  `set_user_info`(email, username=None, role=None, notes=None, state=None, name=None, cell_phone=None, company=None, all_kiosks=None, same_assign=None, alert_all=None)

    edit the userinfo

  `update_users_conn_id`(conn_id, old_conn_id)

    Update conn_id

## Module contents