[NEW] Team restriction property for controlling who can create and share content

Asana recently introduced a new team permission setting that optionally restricts who is allowed to create and share team content. This change enables team admins to have more control of the privacy and creation of a team’s content.

The ability to restrict teams is also available in the API as a property on the team object. The field is named team_content_management_restriction and its value can be set to either no_restriction or only_team_admins. This new field allows developers to programmatically query for and update a team’s restriction settings.

Who is affected

  • The default value of “team_content_management_restriction” is “no_restriction”, which results in no changes to behavior. Users who could previously create or share content with a team remain able to do so.
  • If this permission is changed to only_team_admins, then only admins of that team will be able to create and share content with that team.
  • Certain operations will return a 403 status code if the user authing a request lacks the required permission on the team. For example:
    • Creating a project in a restricted team (POST /projects)
    • Changing the team of a project to a restricted team (PUT /projects/project_gid)
    • Setting the owner of a goal to a restricted team (PUT /goals/goal_gid)
  • Note that your app may break if it doesn’t gracefully handle 403 errors for restricted teams

Usage

Here is the dialogue in the Asana web app to set team restrictions:

The API mirrors this feature using the team_content_management_access_level field.

  • To fetch the restriction settings for teams, you can pass opt_fields=team_content_management_access_level with GET requests.

  • To set team restrictions when creating or updating a team, include the team_content_management_access_level field in the write request body with a value of either no_restriction or only_team_admins.

Why we’re making this change

  • This API change parallels the new product behavior, allowing developers to get and set team restrictions.

Let us know if you have any questions.

Happy coding!

Asana DevRel

2 Likes