adaptlearning / adapt_authoring

A server-based user interface for authoring eLearning courses using the Adapt framework.
https://www.adaptlearning.org/
GNU General Public License v3.0
520 stars 287 forks source link

Asset management; Non-Admin users: Delete button should be hidden on other user's assets #2353

Open canstudios-kent opened 5 years ago

canstudios-kent commented 5 years ago

Expected Behaviour

Admin type users can edit and delete any user's assets when in Asset management. Non-Admin type users can only delete their own asset in Asset management.

Actual Behaviour

The "Delete" button is still visible on other user's assets. Nothing happens when clicking "Delete", though a 500 error does appear in the browser dev tool. Can the "Delete" button be made to only be visible on assets that the user has uploaded?

Steps to Reproduce

  1. Log in as a Course Creator user.
  2. Navigate to Asset management.
  3. Click an asset. Notice that the "Delete" buttons is visible.
  4. Click "Delete". Notice that the asset remains visible.

Versions

canstudios-nicolaw commented 5 years ago

@tomgreenfield What are your thoughts on this?

tomgreenfield commented 5 years ago

No strong feelings either way, @canstudios-nicolaw. In other places have we not attempted to hide functionality and instead displayed a permissions dialog?

dancgray commented 5 years ago

Also deleted asset (that the course creator owns) are not shown in asset manager. Should have a greyed out image. I'm happy if course creators can soft delete assets they do not own. Problem seems to be that behavior is in inconsistent. Issue #1450 is still happening.