class allura.model.auth.User
property activity_extras

Return a BSON-serializable dict of extra stuff to store on the activity.

property activity_name

Override this for each Artifact type.


Return true if User is permitted to send a mesage to another user.

Returns False if User has exceeded the user message rate limit, in which case another message may not be sent until sufficient time has passed to clear the limit.


Return a dict representation of this object suitable for search indexing.

Subclasses should implement this, providing a dictionary of solr_field => value. These fields & values will be stored by Solr. Subclasses should call the super().index() and then extend it with more fields.

You probably want to override at least title and text to have meaningful search results and email senders.

You can take advantage of Solr’s dynamic field typing by adding a type suffix to your field names, e.g.:

_s (string) (not analyzed) _t (text) (analyzed) _b (bool) _i (int) _f (float) _dt (datetime)


Return only projects for which user has that role.


Returns the personal user-project for the user

send_user_mention_notification(mentioned_by, artifact)

Send user mention notification to {self} user.

send_user_message(user, subject, message, cc, reply_to_real_address, sender_email_address)

Send a user message (email) to user.

should_update_index(old_doc, new_doc)

Determines if solr index should be updated.

Values passed as old_doc and new_doc are original and modified versions of same object, represented as dictionaries.


Return a timedelta of the time remaining before this user can send another user message.

Returns zero if user message can be sent immediately.


Return the URL (relative to root domain) for this user’s user-project. This includes any special handling via the AuthenticationProvider to determine the proper user-project name

class allura.model.auth.ProjectRole

The roles that a single user holds in a project. Also the named roles (called “Groups” in the UI) are in this model (and can include other named roles)

  • user_id – used if this role is for a single user. Empty for named roles

  • project_id – the project id

  • name – named roles (like Admin, Developer, custom-names-too)

  • roles – a list of other ProjectRole ObjectId values which this user/group has access to

class allura.model.auth.AuditLog