diff --git a/pandora/event/views.py b/pandora/event/views.py index 19cf0fd3..adf9e758 100644 --- a/pandora/event/views.py +++ b/pandora/event/views.py @@ -8,16 +8,17 @@ from django.conf import settings from six import string_types import ox from ox.utils import json + +from changelog.models import add_changelog +from item import utils +from oxdjango.api import actions from oxdjango.decorators import login_required_json from oxdjango.shortcuts import render_to_json_response, get_object_or_404_json, json_response - -from oxdjango.api import actions -from item import utils -from changelog.models import add_changelog +from user.decorators import capability_required_json from . import models -@login_required_json +@capability_required_json('canEditEvents') def addEvent(request, data): ''' Adds a new event to the calendar diff --git a/pandora/place/views.py b/pandora/place/views.py index c87e6c68..43ec4829 100644 --- a/pandora/place/views.py +++ b/pandora/place/views.py @@ -9,16 +9,16 @@ from six import string_types import ox from ox.utils import json +from changelog.models import add_changelog +from item import utils +from oxdjango.api import actions from oxdjango.decorators import login_required_json from oxdjango.shortcuts import render_to_json_response, get_object_or_404_json, json_response - -from oxdjango.api import actions -from item import utils -from changelog.models import add_changelog +from user.decorators import capability_required_json from . import models -@login_required_json +@capability_required_json('canEditPlaces') def addPlace(request, data): ''' Adds a new place to the map