Procházet zdrojové kódy

fix role for set content

Guénaël Muller před 7 roky
rodič
revize
5a2a0b3f8e
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      tracim/views/contents_api/html_document_controller.py

+ 1 - 0
tracim/views/contents_api/html_document_controller.py Zobrazit soubor

132
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
132
     @hapic.handle_exception(InsufficientUserProfile, HTTPStatus.FORBIDDEN)
133
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
133
     @hapic.handle_exception(WorkspaceNotFound, HTTPStatus.FORBIDDEN)
134
     @hapic.handle_exception(AuthenticationFailed, HTTPStatus.BAD_REQUEST)
134
     @hapic.handle_exception(AuthenticationFailed, HTTPStatus.BAD_REQUEST)
135
+    @require_workspace_role(UserRoleInWorkspace.CONTRIBUTOR)
135
     @require_content_types([htmlpage_type])
136
     @require_content_types([htmlpage_type])
136
     @hapic.input_path(WorkspaceAndContentIdPathSchema())
137
     @hapic.input_path(WorkspaceAndContentIdPathSchema())
137
     @hapic.input_body(SetContentStatusSchema())
138
     @hapic.input_body(SetContentStatusSchema())