コード例 #1
0
ファイル: views.py プロジェクト: CommonsCloud/Core-API
def application_user_delete(oauth_request, application_id, user_id, extension):

  UserApplications_ = UserApplications(application_id, user_id)
  UserApplications_.current_user = oauth_request.user

  user_permissions = UserApplications_.permission_delete(application_id, user_id)

  if type(user_permissions) is tuple:
    return user_permissions

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

  return status_.status_204(), 204
コード例 #2
0
ファイル: views.py プロジェクト: CommonsCloud/Core-API
def application_user_update(oauth_request, application_id, user_id, extension):

  UserApplications_ = UserApplications(application_id, user_id)
  UserApplications_.current_user = oauth_request.user

  user_permissions = UserApplications_.permission_update(application_id, user_id, request)

  if type(user_permissions) is tuple:
    return user_permissions

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

  return UserApplications_.endpoint_response(**arguments)