This repository has been archived by the owner. It is now read-only.
Browse files

check role before deleting by digest

  • Loading branch information...
ewdurbin committed Oct 12, 2017
1 parent 5278462 commit 18200fa6731faeeda2433dd1c61d04373ad8a653
Showing with 8 additions and 1 deletion.
  1. +8 −1
@@ -2449,8 +2449,15 @@ def files(self):
fids = [fids]

for digest in fids:
file_info =
if'Maintainer', file_info['name']) or \'Admin', file_info['name']) or \'Owner', file_info['name']):

This comment has been minimized.


warvariuc Aug 30, 2018

Why not allowing passing multiple roles to has_role? Then the code would look like:

if['Maintainer', 'Admin', 'Owner'], file_info['name']):

This comment has been minimized.


jamadden Aug 30, 2018


Thanks for your comment! This code is no longer developed. It has been replaced by
raise Forbidden, \
"You are not allowed to edit '%s' package information"%file_info['name']
except KeyError:
return'No such files to remove', code=200)

0 comments on commit 18200fa

Please sign in to comment.