Exercise - Manage permissions

Completed

As highlighted earlier, you can add users with permissions to modify data through the admin site. Let's update the staffuser user we created in a prior unit to have permissions to modify dogs.

Set the user permissions

  1. Return to the admin site in your browser.

  2. Select Users.

  3. Select staffuser to update our staffuser.

  4. Ensure Staff status is selected.

  5. Scroll down to User permissions.

  6. Select the following permissions:

    • dog_shelters | dog | Can add dog
    • dog_shelters | dog | Can change dog
    • dog_shelters | dog | Can view dog

    Note

    The page highlights that you can select multiple permissions by using Control or Command and selecting each item.

  7. Select Choose.

    Screenshot showing a dialog box with selected permissions.

  8. Select SAVE.

Sign in as the staff user

Let's see the difference between a superuser and a staff user by signing in as a staff user.

  1. Select LOG OUT in the upper-right corner.

  2. Select Login again.

  3. Sign in as staffuser by using the password you created earlier.

    Note

    If you forgot the password, you can sign in as your superuser and reset the password.

    Notice that the admin page only allows access to Dogs.

    Staff user page showing Dogs as the only administrative option.

  4. Select Dogs.

  5. Select the dog you created earlier.

    Notice that you can modify the dog, but not delete it.

Summary

We've now configured a staff user with limited permissions in the admin site. You can use this capability to control access to sensitive data in your application.