class allura.model.project.AppConfig

Configuration information for an instantiated Application in a Project

  • options – an object on which various options are stored. options.mount_point is the url component for this app instance
  • acl – a dict that maps permissions (strings) to lists of roles that have the permission
Returns:the related Application class

ACL processing should terminate at the AppConfig


return the URL for the app config. project parameter is for optimization

class allura.model.project.Project

Projects contain tools, subprojects, and their own metadata. They live in exactly one Neighborhood

classmethod accolades_index(projects)

Return a dict[project_id] = list of accolades, efficiently

add_user(user, role_names)

Convenience method to add member with the given role(s).


Find all the users who have ‘Admin’ role for this project


Returns a dict of human-readable root troves => [categories]


Return a filename (configurable) for this project export. The current timestamp may be included, so only run this method once per export.

Parameters:rootdir – a directory path, using {nbhd} {project} or {c..} substitution vars if desired
Returns:a bulk export path for the current project

Returns ‘busy’ if an export is queued or in-progress. Returns None otherwise


Return a SitemapEntry list suitable for rendering the project navbar with tools grouped together by tool type.

classmethod icon_urls(projects)

Return a dict[project_id] = icon_url, efficiently

install_app(ep_name, mount_point=None, mount_label=None, ordinal=None, **override_options)

Install an app

  • ep_name (str) – Entry Point name, e.g. “wiki”
  • mount_point (str) – URL path, e.g. “docs”
  • mount_label (str) – Display name
  • ordinal (int) – location of tool, relative to others; None will go to the end.
  • override_options


Install many apps at once.

Better than doing individually if you expect default name conflicts (e.g. “code” for both git & svn), by using the tool_label value.

Parameters:apps_params (list) – list of dicts, where each dict is the args used in install_app()

Return the ordinal of the next open toolbar mount point for this project.


Returns an array of a projects mounts (tools and sub-projects) in toolbar order. Note that the top-level ‘ordinal’ field may be offset from the stored ordinal value, due to anchored tools


ACL processing should proceed up the project hierarchy.


Return True if this project is private, else False.

should_update_index(old_doc, new_doc)

Skip index update if only last_updated has changed.

Value of last_updated is updated whenever any artifact that belongs to project is changed. This generates a lot of unnecessary add_projects tasks for every simple user action.

sitemap(excluded_tools=None, included_tools=None, tools_only=False, per_tool_limit=10)

Return the project sitemap.

  • excluded_tools (list) – Tool names (AppConfig.tool_name) to exclude from sitemap.
  • included_tools (list) – Tool names (AppConfig.tool_name) to include. Use None to include all tool types.
  • tools_only (bool) – Only include tools in the sitemap (exclude subprojects).
  • per_tool_limit (int) – Max number of entries included in the sitemap for a single tool type. Use None to include all.

If this is a user-project, return the User, else None


Find all the users who have named roles for this project


Return all users in this project that have at least one of the roles specified.

e.g., project.users_with_role(‘Admin’, ‘Developer’) -> returns all
users in project having the Admin role or the Developer role, or both
class allura.model.project.ProjectNameFieldProperty(field_type, *args, **kwargs)

Make project names be the username instead of u/whatever, when a user-project. Particularly nice if the username and user-project name don’t match exactly. (This is a python “descriptor”)