Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions flask_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ def has_permissions(self):
Checks the current user permission set against the one being requested
by the application.
"""
perms = self.request('/me/permissions')['data'][0].keys()
return all(k in perms for k in app.config[
perm_data = self.request('/me/permissions')['data']
granted_perms = [perm['permission'] for perm in perm_data if perm['status'] == 'granted']
return all(k in granted_perms for k in app.config[
'CANVAS_SCOPE'].split(','))


Expand Down