wvuweb / cleanslate-cms

A place to file issues and view releases for CleanSlate CMS. http://cleanslatecms.wvu.edu
6 stars 0 forks source link

Writers can see the "Delete Page" button in Pages, but don't have access to delete pages. #258

Closed adamjohnson closed 4 years ago

adamjohnson commented 4 years ago

I gave someone access to a site as a Writer. I watched them create several pages. At one point, they messed up and wanted to delete a page. When they went to delete a page, they got a "Request failed (error)" and it left them confused.

Steps to reproduce the issue

  1. Log in to CleanSlate as a Writer (or "Act as" a user with Writer permissions).
    • If you're looking for a user to "Act As", here's one.
  2. Go to Pages in a site.
  3. As a writer, click "Delete" on any page.
  4. Fill out the modal (DELETE!) and confirm the page deletion.

Results

A notification appears that says:

Request failed (error)

Expected results

Writers should not see the "Delete Page" button if they don't have permission to delete a page.

OR

The "Delete Page" button should be disabled. When they click it, they get a (bootbox) message that says:

As a Writer, you don't have access to delete pages. Please contact a Publisher or Administrator to delete this page.

Relevant files:

Related to #32

adamjohnson commented 4 years ago

Appears to work. Thanks!