IAM Contrib Users

Table of Contents

Models

class iam.contrib.users.models.AbstractBaseIAMUser(*args, **kwargs)

Abstract base user class that implements the IAMUserMixin interface to interact with IAM.

class iam.contrib.users.models.AbstractIAMUser(*args, **kwargs)

Abstract base user class that implements the IAMUserMixin interface to interact with IAM, inherits from RulesModel to manage its permissions using rules, plus a few handy properties.

property display_id
Returns

The best string of characters to id this user on a UI. Defaults to instance.username. Change .id_field to use a different field for id (e.g. email).

property display_name
Returns

The best way to display this user’s name in a UI. Default to their full name if it exists, otherwise their username.

property full_name
Returns

Return the user’s full name (i.e. first_name + last_name)

Admin

class iam.contrib.users.admin.BaseIAMUserAdmin(model, admin_site)

Base admin class for inheritors of AbstractIAMUser.

class iam.contrib.users.admin.HideSuperuserUserAdminMixin

Hide sensitive data from non-superuser.

Includes:

  • sensitive fields (e.g. is_superuser, user_permissions)

  • sensitive users (i.e. superusers)

class iam.contrib.users.admin.IAMUserAdmin(model, admin_site)

Admin class for custom user models that inherit from AbstractIAMUser