Convert if not GlobalStaff().has_user(request.user): to use user.has_perm

Description

On or around line 518 of cms/djangoapps/contentstore/views/certificates.py, convert if not GlobalStaff().has_user(request.user): to use user.has_perm(DELETE_ACTIVE_CERTIFICATE) instead.
Define DELETE_ACTIVE_CERTIFICATE = 'contentstore.delete_active_certificate' in contentstore/permissions.py
Add perms[DELETE_ACTIVE_CERTIFICATE] = HasAccessRule(...) to contentstore/permissions.py
See https://github.com/edx/edx-platform/pull/21255/files as an example.
This issue was generated from https://docs.google.com/spreadsheets/d/1WyP5TQUp8xhhtYndNFJDDeCc1g1nz-3YJye-xdG8IPI/edit#gid=284364275&fvid=912579421

Status

Assignee

Unassigned

Reporter

Calen Pennington

Labels

None

Priority

Unset
Configure