Skip to content

Commit

Permalink
Fix permission issue for boa_submit_job view
Browse files Browse the repository at this point in the history
  • Loading branch information
cslzchen committed Nov 3, 2023
1 parent e24b524 commit aa4785d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions addons/boa/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
from framework.auth.decorators import must_be_logged_in
from framework.celery_tasks.handlers import enqueue_task
from osf.models import ExternalAccount, AbstractNode
from osf.utils import permissions
from website import settings as osf_settings
from website.project.decorators import must_have_addon
from website.project.decorators import must_have_addon, must_have_permission

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -67,9 +68,9 @@ def boa_add_user_account(auth, **kwargs):


@must_be_logged_in
@must_have_addon(SHORT_NAME, 'user')
@must_have_addon(SHORT_NAME, 'node')
def boa_submit_job(node_addon, user_addon, **kwargs):
@must_have_permission(permissions.WRITE)
def boa_submit_job(node_addon, **kwargs):

req_params = request.json

Expand Down

0 comments on commit aa4785d

Please sign in to comment.