Esempio n. 1
0
def template_user_delete(oauth_request, template_id, user_id, extension):

    UserTemplates_ = UserTemplates(template_id, user_id)
    UserTemplates_.current_user = oauth_request.user
    deleted_template = UserTemplates_.permission_delete(template_id, user_id)

    if type(deleted_template) is tuple:
        return deleted_template

    return status_.status_204(), 204
Esempio n. 2
0
def template_user_update(oauth_request, template_id, user_id, extension):

    UserTemplates_ = UserTemplates(template_id, user_id)
    UserTemplates_.current_user = oauth_request.user

    user_permissions = UserTemplates_.permission_update(template_id, user_id, request)

    if type(user_permissions) is tuple:
        return user_permissions

    arguments = {"the_content": user_permissions, "extension": extension}

    return UserTemplates_.endpoint_response(**arguments)