title "WordPress Roles and Capabilities"
!theme mars
left to right direction
skinparam nodesep 20
skinparam ranksep 100

package Editor {
  actor Editor as edi #Green
  rectangle Pages {
    usecase "Delete Others Pages" as delete_others_pages #LightBlue
    usecase "Delete Own Pages" as delete_pages #LightBlue
    usecase "Delete Private Pages" as delete_private_pages #LightBlue
    usecase "Delete Own Published Pages" as delete_published_pages #LightBlue
    usecase "Edit Others Pages" as edit_others_pages #LightBlue
    usecase "Edit Own Pages" as edit_pages #LightBlue
    usecase "Edit Private Pages" as edit_private_pages #LightBlue
    usecase "Edit Own Published Pages" as edit_published_pages #LightBlue
    usecase "Publish Own Pages" as publish_pages #LightBlue
    usecase "Read Private Pages" as read_private_pages #LightBlue
  rectangle "Posts " {
    usecase "Delete Others Posts" as delete_others_posts #LightGreen
    usecase "Delete Private Posts" as delete_private_posts #LightGreen
    usecase "Edit Others Posts" as edit_others_posts #LightGreen
    usecase "Edit Private Posts" as edit_private_posts #LightGreen
    usecase "Read Private Posts" as read_private_posts #LightGreen
  usecase "Manage Categories" as manage_categories #LightPink
  usecase "Manage Links" as manage_links #LightPink
  usecase "Moderate Comments" as moderate_comments #Coral
  usecase "Post HTML/JS" as unfiltered_html #Olive

  package Author {
    actor Author as aut #Blue
    rectangle Posts {
      usecase "Publish Own Posts" as publish_posts #LightGreen
      usecase "Edit Own Published Posts" as edit_published_posts #LightGreen
      usecase "Delete Own Published Posts" as delete_published_posts #LightGreen
    usecase "Add New Media" as upload_files #RosyBrown

    package Contributor {
      actor Contributor as con #Indigo

      usecase "Edit Own Posts" as edit_posts #LightGreen
      usecase "Delete Own Posts" as delete_posts #LightGreen

      package Subscriber {
        actor Subscriber as sub #Violet

        usecase "Manage Own profile" as read #Orange

' Subscriber
sub --> read

' Contributor
con --|> sub
con --> edit_posts
con --> delete_posts

' Author
aut --|> con
aut --> publish_posts
aut --> edit_published_posts
aut --> delete_published_posts
aut --> upload_files

' Editor
edi --|> aut
edi --> delete_others_pages
edi --> delete_others_posts
edi --> delete_pages
edi --> delete_private_pages
edi --> delete_private_posts
edi --> delete_published_pages
edi --> edit_others_pages
edi --> edit_others_posts
edi --> edit_pages
edi --> edit_private_pages
edi --> edit_private_posts
edi --> edit_published_pages
edi --> manage_categories
edi --> manage_links
edi --> moderate_comments
edi --> publish_pages
edi --> read_private_pages
edi --> read_private_posts
edi --> unfiltered_html


The use case diagram represents different WordPress roles and their corresponding permissions. Here is a description of this use case diagram:

The diagram showcases the following roles and their associated permissions in WordPress:

  1. Subscriber: Subscribers have the ability to manage their own profile, which includes viewing and modifying their personal information.
  2. Contributor: Contributors have additional capabilities compared to subscribers. They can create and edit their own posts. Contributors can also delete their own posts.
  3. Author: Authors have all the permissions of contributors. In addition, they can publish their own posts, edit their own published posts, and delete their own published posts. Authors also have the ability to upload files such as media.
  4. Editor: Editors have the most extensive set of permissions. They possess all the capabilities of authors and contributors. Additionally, editors can perform actions on other users’ posts, such as deleting others’ pages and posts, editing others’ pages and posts, and managing categories and links. Editors also have the authority to moderate comments and post HTML/JS content without filtering.

The arrows in the diagram indicate the hierarchical relationships between the roles. Here are the relationships:

  • Subscribers are at the base of the hierarchy and have no sub-roles.
  • Contributors are a level above subscribers and inherit the capabilities of subscribers.
  • Authors are a level above contributors and inherit the capabilities of contributors.
  • Editors are at the top of the hierarchy and inherit the capabilities of authors.

By visualizing the roles and their associated permissions, the use case diagram provides a clear overview of the different levels of access and control within the WordPress platform.

Leave a Reply

Your email address will not be published. Required fields are marked *