Add a comment

This commit is contained in:
Kazuhito Hokamura 2016-10-05 22:08:23 +09:00 committed by Arik Fraimovich
parent 025e9d2710
commit 9786063dbb

View File

@ -53,6 +53,7 @@ class WidgetListResource(BaseResource):
class WidgetResource(BaseResource):
@require_permission('edit_dashboard')
def post(self, widget_id):
# This method currently handles Text Box widgets only.
widget = models.Widget.get_by_id_and_org(widget_id, self.current_org)
require_admin_or_owner(widget.dashboard.user_id)
widget_properties = request.get_json(force=True)