Task: Modify a User's Roles (and therefore their permissions)

Hub user accounts (including special user Anonymous) get their permissions from their assigned roles. You can therefore adjust the permissions that apply to a user by adding or removing roles from their assigned set.



Overview

Hub user accounts (including special user Anonymous) get their permissions from their assigned roles. To adjust the permissions that apply to a user you therefore have two options:

This page describes the steps required for the first of these options: adjusting the user's role assignments.
For the second option, see Task: Modify a Role's Permissions.

Note that all users always have the Anyone role: you will not be able to remove this role from any user.

Permissions Needed For This Task

You will need to be authenticated as a user with the necessary permissions.

G_ADMINISTER_USERS is sufficient for all operations described on this page, and necessary if you want to change a user's default role.
resourcetype_READ X
For all resources X of interest
is sufficient to determine roles of interest.
(Read access to the Global Role-Permissions page is always available.)
ROLE_ASSIGN R
For all roles R of interest
is sufficient to add/remove user roles R.

It is sufficient to authenticate as a user with the special Administrator role, which immutably has the necessary permissions. In particular, it is always sufficient to authenticate as special user Administrator.

Determine Roles of Interest

If you are not sure which roles you want a user to have, evaluate the available roles in order to make a decision.

To evaluate the available roles, proceed as follows.

  1. If the CodeSonar Web GUI is not already open, open it now.
  2. If you are currently signed into a user account that does not have suitable permissions:
    1. Sign out: click your username in the GUI page header Sign In icon, then click the Sign Out link that pops up.
    2. Click the Sign In link in the GUI page header: Sign In icon
      The Sign In page will open.
    3. Sign back in as Administrator (or another user with suitable permissions).
  3. Navigate to the Global Role-Permissions page.
    1. Click the Settings icon Settings icon in the page header to view the Settings page.
    2. Select the User Administration tab.
    3. Click Global Permissions.
      The Global Role-Permissions page will open.
  4. Inspect the table of global role-permission assignments to identify the roles you are interested in.
    The global role-permissions apply hub-wide.
  5. If you are also interested in resource role-permissions, inspect the relevant Resource Role-Permission pages.
    For example, suppose you are interested in permissions with respect to the project called ProjectX. Then:
    1. Navigate to the Project page for Project X.
      (For detailed navigation instructions, see Task: View Information About a Project.)
    2. Expand the Project Details section of the page.
    3. Click the Permissions link at the top of the Project Details section.
      The Resource Role-Permissions page for ProjectX will open.
    4. Inspect the table to identify the roles you are interested in.
      Note that if a role has a particular Analysis permission ( directly or indirectly ) for ProjectX, it will implicitly have that permission for all analyses of ProjectX.

Once you have determined which roles you are interested in, go on to Add and Remove User Roles or Change Default Role.

Add and Remove User Roles

Suppose you wish to adjust the role assignments for user alex, and you already know which roles you want to add/remove (if not, see Determine Roles of Interest, above). Then proceed as follows.

  1. If the CodeSonar Web GUI is not already open, open it now.
  2. If you are currently signed into a user account that does not have suitable permissions:
    1. Sign out: click your username in the GUI page header Sign In icon, then click the Sign Out link that pops up.
    2. Click the Sign In link in the GUI page header: Sign In icon
      The Sign In page will open.
    3. Sign back in as Administrator (or another user with suitable permissions).
  3. Navigate to the User Roles page for alex:
    1. Click the Settings icon Settings icon in the page header to view the Settings page.
    2. Select the User Administration tab.
    3. Click Users.
      The Users page will open.
    4. In the Users page, click the table row for user alex.
      The Account Editor for alex will open.
    5. On the Account Settings tab of the Account Editor, click View and Edit Roles (in the Access Control section).
      The User Roles page for alex will open.
  4. In the table of roles, click the Assigned checkboxes to add and remove direct assignments for alex.
    Note that you will only be able to directly remove roles that alex is directly assigned.
  5. Click Save Changes.
    The table will be updated to show the new set of roles for alex.

Change Default Role

One of the assigned roles for each user is designated the default role for that user, and determines the initial role-permission settings for all new named searches, report templates, saved charts, and warning processors created by that user.

Suppose you wish to set Engineer as the default role for user alex, and Engineer is already one of alex's roles (if not, see Add and Remove User Roles, above). Then proceed as follows.

  1. If the CodeSonar Web GUI is not already open, open it now.
  2. If you are currently signed into a user account that does not have G_ADMINISTER_USERS permission:
    1. Sign out: click your username in the GUI page header Sign In icon, then click the Sign Out link that pops up.
    2. Click the Sign In link in the GUI page header: Sign In icon
      The Sign In page will open.
    3. Sign back in as Administrator (or another user with G_ADMINISTER_USERS permission).
  3. Navigate to the Account Editor page for alex:
    1. Click the Settings icon Settings icon in the page header to view the Settings page.
    2. Select the User Administration tab.
    3. Click Users.
      The Users page will open.
    4. In the Users page, click the table row for user alex.
      The Account Editor for alex will open.
  4. On the Account Settings tab of the Account Editor, select Engineer from the Default Role for Saved Resources menu (in the Access Control section).
  5. Click Update.
    The page will display a confirmation message.

Links