User#

class geodesic.account.user.User(**info)[source]#

The User class to represent user info and control/update profile and permissions. Certain functionality will be restricted to admins.

Parameters:
  • **info – metadata about a particular user, this can be used to create or update

  • profile. (the User's)

Attributes

alias

(str) - the user's common name

avatar

(str) - publically accessible link to the user's avatar/profile pic

bio

(str) - user's short bio

email

(str) - user's email address

enabled

Checks if this user's account is currently enabled in the system.

first_name

(str) - user's first name

last_name

(str) - user's last name

middle_name

(str) - user's middle name

org

(str) - user's organization

permissions

Deprecated in v1.0.0

pronouns

(str) - user's preferred personal pronouns

roles

Deprecated in v1.0.0

subject

(str) - the unique identifer of the subject

Methods

clear()

copy()

create()

Creates this user on the server side.

delete()

Delete this account and all associations.

fromkeys([value])

Create a new dictionary with keys from iterable and values set to value.

get(key[, default])

Return the value for key if key is in the dictionary, else default.

get_permissions()

Gets and returns the user's permissions as a list of strings.

get_roles()

Gets and returns all of the roles for this user: admin/internal/user.

items()

keys()

pop(k[,d])

If key is not found, default is returned if given, otherwise KeyError is raised

popitem()

Remove and return a (key, value) pair as a 2-tuple.

save()

Updates this user on the server side.

setdefault(key[, default])

Insert key with a value of default if key is not in the dictionary.

update(*mapping, **kwargs)

update_permissions(permissions)

Sets the user's permissions on the server side.

values()