Updated on 2024-11-14 GMT+08:00

Managing Project Permissions

Scenario

CodeArts provides role-based access control (RBAC). New users do not have any permissions assigned by default. You need to first add them to one or more projects and then assign roles to these users. The users can perform specified operations on cloud services based on the permissions they have been assigned.

CodeArts has multiple built-in system roles. You can also create custom roles with desired permissions for CodeArts Req, CodeArts Repo, CodeArts Check, CodeArts Build, CodeArts Artifact, CodeArts Deploy, CodeArts TestPlan, and CodeArts Pipeline.

Modifying Permissions of a System Role

Ensure that you have permission to assign permissions in the project.

  1. Go to the CodeArts homepage.

    1. Log in to the CodeArts console, click , and select a region.
    2. Click Access Service.

  2. On the CodeArts homepage, click a project name to access the project.
  3. In the navigation pane, choose Settings > Permissions.
  4. In the role list, click a role name.
  5. Click a service name. The role's permissions for the service are displayed.
  6. Click Edit, modify the permissions, and click Save.

    • Permissions of the project administrator role cannot be edited.
    • The general permissions of the project manager role cannot be edited.

  7. Check the updated permissions.

Creating a Role

Ensure that you have permission to assign permissions in the project.

  1. Go to the CodeArts homepage.

    1. Log in to the CodeArts console, click , and select a region.
    2. Click Access Service.

  2. On the CodeArts homepage, click a project name.
  3. In the navigation pane, choose Settings > Permissions.
  4. Click + next to Role.
  5. In the displayed dialog box, configure the following information and click OK.

    Table 1 Creating a role

    Parameter

    Mandatory

    Description

    Role Name

    Yes

    • Do not use the name of a system role.
    • Enter a maximum of 30 characters, including letters, digits, spaces, and the following special characters: () [] - _ ~. & <> {}

    Copy Role

    No

    Copy an existing role from a project of the same type.

  6. Check the new role under Custom Roles.

    You can perform the following operations on the new role.

    Table 2 Managing a custom role

    Operation

    Description

    Editing the role's permissions

    See Modifying Permissions of a System Role.

    Modifying the role name

    1. Click next to the role name and choose Modify Role Name.
    2. Enter a new name and click OK.

      The updated role name is displayed.

    Deleting the role

    1. Click next to the role name and choose Delete Role.
    2. Enter YES and click OK.

      The role is no longer displayed on the page.

Managing Permission Templates

When multiple projects require the same permission settings, you can configure permissions for one of the projects, and save the settings as a permission template to reuse in other projects.

  • Permission templates can be reused only between projects of the same type.
  • Each tenant can create a maximum of 20 permission templates.
  • Creating a Permission Template
    1. Go to the CodeArts homepage.
      1. Log in to the CodeArts console, click , and select a region.
      2. Click Access Service.
    2. On the CodeArts homepage, click a project name.
    3. In the navigation pane, choose Settings > Permissions.
    4. Click Save as Template.
    5. In the displayed dialog box, configure the following information and click OK.
      Table 3 Saving permission settings as a template

      Parameter

      Mandatory

      Description

      Name

      Yes

      Enter a maximum of 64 characters, including letters and digits.

      Description

      No

      Enter a maximum of 256 characters, including letters, digits, spaces, and these special characters: , . () []

    6. Save the settings. Click the username on the navigation bar and choose All Account Settings.
    7. Choose General > Permission Template. The saved permission template is displayed.

      Users with the Tenant Administrator role can edit and delete permission templates.

  • Using Permission Templates in a Project
    1. Go to the CodeArts homepage.
      1. Log in to the CodeArts console, click , and select a region.
      2. Click Access Service.
    2. On the CodeArts homepage, click a project name.
    3. In the navigation pane, choose Settings > Permissions.
    4. On the Permissions tab, click the Select Template drop-down list and select a template.
    5. Click OK.
    6. Check the updated role permissions.