Skip to content
This repository was archived by the owner on Oct 24, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions tracim/lib/utils/authorization.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from typing import TYPE_CHECKING

import functools
from pyramid.interfaces import IAuthorizationPolicy
from zope.interface import implementer
try:
Expand Down Expand Up @@ -53,6 +53,7 @@ def require_same_user_or_profile(group: int):
:return:
"""
def decorator(func):
@functools.wraps(func)
def wrapper(self, context, request: 'TracimRequest'):
auth_user = request.current_user
candidate_user = request.candidate_user
Expand All @@ -73,6 +74,7 @@ def require_profile(group: int):
:return:
"""
def decorator(func):
@functools.wraps(func)
def wrapper(self, context, request: 'TracimRequest'):
user = request.current_user
if user.profile.id >= group:
Expand All @@ -91,7 +93,7 @@ def require_workspace_role(minimal_required_role: int):
:return: decorator
"""
def decorator(func):

@functools.wraps(func)
def wrapper(self, context, request: 'TracimRequest'):
user = request.current_user
workspace = request.current_workspace
Expand Down
2 changes: 1 addition & 1 deletion tracim/views/core_api/system_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def applications(self, context, request: TracimRequest, hapic_data=None):
@hapic.output_body(ContentTypeSchema(many=True),)
def content_types(self, context, request: TracimRequest, hapic_data=None):
"""
Get list of alls applications installed in this tracim instance.
Get list of alls content types availables in this tracim instance.
"""

return CONTENT_DEFAULT_TYPE
Expand Down